fluxflow-cli 1.8.13 → 1.8.15
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 +67 -18
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -696,8 +696,9 @@ ${mode === "Flux" ? `
|
|
|
696
696
|
1. View File: tool:functions.view_file(path="relative/path", start_line=number, end_line=number). Reads file content. Auto-truncates at 500 lines unless start_line and end_line are provided. YOU CAN ALSO USE THIS TOOL TO SEE IMAGES AND DOCUMENTS IN A FOLDER. IF USER ASK HOW TO SHARE A IMAGE TELL THEM TO PASTE THE IMAGE IN THE CURRENT FOLDER. IF USER GIVES A IMAGE/DOCUMENT, YOU MUST SEE IT FIRST BEFORE DOING ANYTHING.
|
|
697
697
|
2. List Files: tool:functions.list_files(path="relative/path"). Lists content of a directory.
|
|
698
698
|
3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory. Prefer this one over list_files.
|
|
699
|
-
4. Write File: tool:functions.write_file(path="path", content="
|
|
700
|
-
|
|
699
|
+
4. Write File: tool:functions.write_file(path="path", content="First Line
|
|
700
|
+
Second Line with literal [/n] sequence"). Creates/Overwrites. NO CODE BLOCKS.
|
|
701
|
+
5. Update File: tool:functions.update_file(path="path", content_to_replace="old content", content_to_add="new content with [/n]"). Surgical patching.
|
|
701
702
|
6. Write PDF: tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait/landscape"). Generates a professional PDF document. Orientation are optional. A4 size page will be used, so any multi-page PDFs calculate your alightment and page breaks to not mess up A4 page layout. DO NOT ADD FOOTER MANUALLY, the system will handle it automatically. USE CSS TO VISUALLY BEAUTIFY THE DOCUMENT, USE full 100vh & 100vw for page area. ENSURE THE CONTENT IS NEVER BROKEN IN BETWEEN PAGES, USE PAGE BREAKS PROACTIVELY FOR A A4 PAGE LAYOUT. Keep generous margins for better redability.
|
|
702
703
|
7. Write DOCX: tool:functions.write_docx(path="path", content="<html content>"). Generates a professional Word document (.docx) from HTML. You can make multiple pages. Default Page dimentions will be A4, use proper margins and page break strategy.
|
|
703
704
|
8. Write PPTX: tool:functions.write_pptx(path="path", content="<h1 style='color: #0088CC;'>Title</h1><ul style='font-size: 14pt;'><li>Point A</li></ul>
|
|
@@ -714,9 +715,11 @@ NEVER GUESS A CODE, IF UNSURE READ THE FILE FIRST BEFORE EDITING IT.
|
|
|
714
715
|
Prefer write_file tool to write code instead of chat by default.
|
|
715
716
|
|
|
716
717
|
*** [\u{1F6A8} CRITICAL POLICY: NEWLINE CONTROL \u{1F6A8}] ***
|
|
717
|
-
1. FOR ACTUAL
|
|
718
|
-
2. TO WRITE THE LITERAL
|
|
719
|
-
\u{1F6D1}
|
|
718
|
+
1. FOR ACTUAL CODE STRUCTURE (Line Breaks): Use standard LF (Press ENTER inside the tool argument).
|
|
719
|
+
2. TO WRITE THE LITERAL CHARACTERS '\\' AND 'n' (e.g., inside printf("Hello\\n")): You MUST use the sequence [/n].
|
|
720
|
+
3. \u{1F6D1} NEVER USE "\\\\n" (backslash-n) inside tool arguments for literal strings; the system parser will convert it into a real structural line break, which WILL BREAK your code syntax (e.g. in C, Python).
|
|
721
|
+
4. ALWAYS check the tool result diff to ensure your [/n] was correctly translated to a literal
|
|
722
|
+
.
|
|
720
723
|
***`.trim() : `
|
|
721
724
|
- DEV & FILE TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX MODE (manually by user).`.trim()}
|
|
722
725
|
-----------------
|
|
@@ -859,7 +862,16 @@ Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"}
|
|
|
859
862
|
-- END TEMPORAL AWARENESS --
|
|
860
863
|
|
|
861
864
|
-- START FORMATTING RULES --
|
|
862
|
-
- CRITICAL NEWLINE PROTOCOL: When writing or updating files, you MUST use actual line breaks (LF) for structural newlines. If you need to write the literal characters '\\n'
|
|
865
|
+
- CRITICAL NEWLINE PROTOCOL: When writing or updating files, you MUST use actual line breaks (LF) for structural newlines. If you need to write the literal characters '\\' and 'n' (e.g., in printf("Hello\\n")), you MUST use the sequence '[/n]'.
|
|
866
|
+
[CORRECT]:
|
|
867
|
+
tool:functions.write_file(path="test.c", content="#include <stdio.h>
|
|
868
|
+
int main() {
|
|
869
|
+
printf("Hello[/n]");
|
|
870
|
+
return 0;
|
|
871
|
+
}")
|
|
872
|
+
[INCORRECT]:
|
|
873
|
+
tool:functions.write_file(path="test.c", content="#include <stdio.h>\\nint main() {\\nprintf("Hello\\\\n");\\n}")
|
|
874
|
+
\u{1F6D1} NEVER use '\\\\n' for literals; it will be converted to a real line break and break code syntax.
|
|
863
875
|
- Structure responses VISUALLY pleasing, easy to read, and beautiful.
|
|
864
876
|
- USE GFM Markdown HEAVILY.
|
|
865
877
|
- Use GFM tables for structured data to keep the terminal view organized. KEEP SENTENCES IN TABLE **SHORT & CONCISE**. AND MAX 4 COLUMNS. DO NOT OVERUSE TABLES.
|
|
@@ -1192,9 +1204,9 @@ var init_arg_parser = __esm({
|
|
|
1192
1204
|
}
|
|
1193
1205
|
const after = argsString.substring(qIdx + 1).trim();
|
|
1194
1206
|
const isLogicalEnd = after === "" || // End of entire string
|
|
1195
|
-
after.startsWith(")") || // End of tool call
|
|
1196
1207
|
after.startsWith(",") || // Next argument separator
|
|
1197
|
-
/^(\w+)\s*=/.test(after)
|
|
1208
|
+
/^(\w+)\s*=/.test(after) || // Next argument key=
|
|
1209
|
+
after.startsWith(")") && (after.length === 1 || /^\)\s*([,\]\s]|tool:)/i.test(after));
|
|
1198
1210
|
if (isLogicalEnd) {
|
|
1199
1211
|
end = qIdx;
|
|
1200
1212
|
break;
|
|
@@ -1210,10 +1222,11 @@ var init_arg_parser = __esm({
|
|
|
1210
1222
|
}
|
|
1211
1223
|
try {
|
|
1212
1224
|
if (value.includes("\\")) {
|
|
1213
|
-
|
|
1225
|
+
const surgicalValue = value.replace(/(^|[^\\])"/g, '$1\\"');
|
|
1226
|
+
value = JSON.parse(`"${surgicalValue.replace(/\n/g, "\\n").replace(/\r/g, "\\r")}"`);
|
|
1214
1227
|
}
|
|
1215
1228
|
} catch (e) {
|
|
1216
|
-
value = value.replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\`/g, "`").replace(/\\\\/g, "\\");
|
|
1229
|
+
value = value.replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\`/g, "`").replace(/\\\\/g, "\\").replace(/\\n/g, "\n");
|
|
1217
1230
|
}
|
|
1218
1231
|
} else if (i < argsString.length && argsString[i] === "[") {
|
|
1219
1232
|
let balance = 0;
|
|
@@ -3588,6 +3601,20 @@ Check what's new using \`/changelog\` command.`,
|
|
|
3588
3601
|
const [activeCommand, setActiveCommand] = useState7(null);
|
|
3589
3602
|
const [execOutput, setExecOutput] = useState7("");
|
|
3590
3603
|
const [isTerminalFocused, setIsTerminalFocused] = useState7(false);
|
|
3604
|
+
useEffect5(() => {
|
|
3605
|
+
if (apiTier !== "Free" && activeModel === "gemma-4-31b-it") {
|
|
3606
|
+
setActiveModel("gemini-3-flash-preview");
|
|
3607
|
+
setMessages((prev) => {
|
|
3608
|
+
setCompletedIndex(prev.length + 1);
|
|
3609
|
+
return [...prev, {
|
|
3610
|
+
id: "tier-switch-" + Date.now(),
|
|
3611
|
+
role: "system",
|
|
3612
|
+
text: `\u26A0\uFE0F **[TIER LIMIT]** Gemma is only available on Free API tier. Automatically switched to Gemini 3 Flash Preview.`,
|
|
3613
|
+
isMeta: true
|
|
3614
|
+
}];
|
|
3615
|
+
});
|
|
3616
|
+
}
|
|
3617
|
+
}, [apiTier, activeModel]);
|
|
3591
3618
|
const terminalEnv = useMemo(() => {
|
|
3592
3619
|
const isIDE = process.env.TERM_PROGRAM === "vscode" || !!process.env.VSC_TERMINAL_URL || !!process.env.INTELLIJ_TERMINAL_COMMAND_BLOCKS;
|
|
3593
3620
|
return {
|
|
@@ -3865,7 +3892,7 @@ Check what's new using \`/changelog\` command.`,
|
|
|
3865
3892
|
cmd: "/model",
|
|
3866
3893
|
desc: "Switch AI model",
|
|
3867
3894
|
subs: [
|
|
3868
|
-
{ cmd: "gemma-4-31b-it", desc: "Standard Default (Free, Recommended)" },
|
|
3895
|
+
{ cmd: "gemma-4-31b-it", desc: apiTier === "Free" ? "Standard Default (Free, Recommended)" : "Standard Default (Free, Recommended) - Cannot use Gemma with paid API" },
|
|
3869
3896
|
{ cmd: "gemini-3.1-pro-preview", desc: "Most Capable (Paid)" },
|
|
3870
3897
|
{ cmd: "gemini-3-flash-preview", desc: "Fast & Lightweight (Paid, Free limited quota)" },
|
|
3871
3898
|
{ cmd: "gemini-3.1-flash-lite-preview", desc: "Ultra Fast (Paid, Free limited quota)" }
|
|
@@ -4032,11 +4059,24 @@ ${hintText}`, color: "magenta" }];
|
|
|
4032
4059
|
case "/model": {
|
|
4033
4060
|
if (parts[1]) {
|
|
4034
4061
|
const mod = parts.slice(1).join(" ");
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4062
|
+
if (mod === "gemma-4-31b-it" && apiTier !== "Free") {
|
|
4063
|
+
setMessages((prev) => {
|
|
4064
|
+
setCompletedIndex(prev.length + 1);
|
|
4065
|
+
return [...prev, {
|
|
4066
|
+
id: Date.now(),
|
|
4067
|
+
role: "system",
|
|
4068
|
+
text: `\u274C **[ACCESS DENIED]** Gemma is restricted to the Free API tier. Automatically switching you to **Gemini 3 Flash Preview** for optimal performance.`,
|
|
4069
|
+
isMeta: true
|
|
4070
|
+
}];
|
|
4071
|
+
});
|
|
4072
|
+
setActiveModel("gemini-3-flash-preview");
|
|
4073
|
+
} else {
|
|
4074
|
+
setActiveModel(mod);
|
|
4075
|
+
setMessages((prev) => {
|
|
4076
|
+
setCompletedIndex(prev.length + 1);
|
|
4077
|
+
return [...prev, { id: Date.now(), role: "system", text: `\u2699\uFE0F [SYSTEM] Model switched to ${mod}`, isMeta: true }];
|
|
4078
|
+
});
|
|
4079
|
+
}
|
|
4040
4080
|
} else {
|
|
4041
4081
|
setActiveView("model");
|
|
4042
4082
|
}
|
|
@@ -5081,8 +5121,17 @@ Selection: ${val}`,
|
|
|
5081
5121
|
visible.map((s, i) => {
|
|
5082
5122
|
const actualIdx = startIdx + i;
|
|
5083
5123
|
const isActive = actualIdx === selectedIndex;
|
|
5124
|
+
const isGemmaDisabled = s.cmd === "gemma-4-31b-it" && apiTier !== "Free";
|
|
5084
5125
|
const cmdText = s.cmd.padEnd(32);
|
|
5085
|
-
return /* @__PURE__ */ React10.createElement(Box10, { key: s.cmd, flexDirection: "row" }, /* @__PURE__ */ React10.createElement(Text10, { color: isActive ? "cyan" : "gray" }, isActive ? "\u276F " : " "), /* @__PURE__ */ React10.createElement(
|
|
5126
|
+
return /* @__PURE__ */ React10.createElement(Box10, { key: s.cmd, flexDirection: "row" }, /* @__PURE__ */ React10.createElement(Text10, { color: isActive ? "cyan" : "gray" }, isActive ? "\u276F " : " "), /* @__PURE__ */ React10.createElement(
|
|
5127
|
+
Text10,
|
|
5128
|
+
{
|
|
5129
|
+
color: isGemmaDisabled ? "gray" : isActive ? "yellow" : "gray",
|
|
5130
|
+
bold: isActive,
|
|
5131
|
+
dimColor: isGemmaDisabled
|
|
5132
|
+
},
|
|
5133
|
+
cmdText
|
|
5134
|
+
), /* @__PURE__ */ React10.createElement(Text10, { color: "gray", dimColor: true, italic: true }, s.desc));
|
|
5086
5135
|
}),
|
|
5087
5136
|
suggestions.length > 5 && /* @__PURE__ */ React10.createElement(Box10, { height: 1 }, remaining > 0 && /* @__PURE__ */ React10.createElement(Text10, { color: "gray", dimColor: true }, " ...(", remaining, "more)"))
|
|
5088
5137
|
);
|
|
@@ -5113,7 +5162,7 @@ var init_app = __esm({
|
|
|
5113
5162
|
init_text();
|
|
5114
5163
|
SESSION_START_TIME = Date.now();
|
|
5115
5164
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
5116
|
-
versionFluxflow = "1.8.
|
|
5165
|
+
versionFluxflow = "1.8.15";
|
|
5117
5166
|
updatedOn = "2026-05-09";
|
|
5118
5167
|
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 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(
|
|
5119
5168
|
CommandMenu,
|