fluxflow-cli 1.3.4 → 1.3.6
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 +114 -37
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -25,7 +25,7 @@ var init_TerminalBox = __esm({
|
|
|
25
25
|
// src/components/ChatLayout.jsx
|
|
26
26
|
import React2 from "react";
|
|
27
27
|
import { Box as Box2, Text as Text2 } from "ink";
|
|
28
|
-
var cleanSignals, formatThinkText, InlineMarkdown, TableRenderer, MarkdownText, DiffLine, DiffBlock, CodeRenderer, MessageItem, ChatLayout, ChatLayout_default;
|
|
28
|
+
var cleanSignals, formatThinkText, InlineMarkdown, wrapText, TableRenderer, MarkdownText, DiffLine, DiffBlock, CodeRenderer, MessageItem, ChatLayout, ChatLayout_default;
|
|
29
29
|
var init_ChatLayout = __esm({
|
|
30
30
|
"src/components/ChatLayout.jsx"() {
|
|
31
31
|
init_TerminalBox();
|
|
@@ -101,6 +101,29 @@ var init_ChatLayout = __esm({
|
|
|
101
101
|
return part;
|
|
102
102
|
}));
|
|
103
103
|
});
|
|
104
|
+
wrapText = (text, width) => {
|
|
105
|
+
if (!text) return "";
|
|
106
|
+
const sourceLines = text.split(/\r?\n/);
|
|
107
|
+
let finalLines = [];
|
|
108
|
+
sourceLines.forEach((sLine) => {
|
|
109
|
+
const words = sLine.split(" ");
|
|
110
|
+
let currentLine = "";
|
|
111
|
+
words.forEach((word) => {
|
|
112
|
+
if ((currentLine + word).length > width) {
|
|
113
|
+
if (currentLine) finalLines.push(currentLine.trim());
|
|
114
|
+
currentLine = word + " ";
|
|
115
|
+
while (currentLine.length > width) {
|
|
116
|
+
finalLines.push(currentLine.substring(0, width));
|
|
117
|
+
currentLine = currentLine.substring(width) + " ";
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
currentLine += word + " ";
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
if (currentLine) finalLines.push(currentLine.trim());
|
|
124
|
+
});
|
|
125
|
+
return finalLines.join("\n");
|
|
126
|
+
};
|
|
104
127
|
TableRenderer = React2.memo(({ buffer, terminalWidth = 80 }) => {
|
|
105
128
|
if (buffer.length < 2) return null;
|
|
106
129
|
const rows = buffer.map(
|
|
@@ -109,7 +132,9 @@ var init_ChatLayout = __esm({
|
|
|
109
132
|
const header = rows[0];
|
|
110
133
|
const data = rows.slice(2);
|
|
111
134
|
const colPercentage = Math.floor(100 / header.length);
|
|
112
|
-
|
|
135
|
+
const availableWidth = terminalWidth - 8;
|
|
136
|
+
const colChars = Math.floor(availableWidth / header.length) - 2;
|
|
137
|
+
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", borderStyle: "round", borderColor: "#333", paddingX: 1, marginY: 1, width: "100%", flexGrow: 1 }, /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "row", borderStyle: "single", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false, borderColor: "#444", marginBottom: 1, paddingBottom: 0, width: "100%" }, header.map((cell, i) => /* @__PURE__ */ React2.createElement(Box2, { key: i, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2 }, /* @__PURE__ */ React2.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "cyan" })))), data.map((row, ri) => /* @__PURE__ */ React2.createElement(Box2, { key: ri, flexDirection: "row", marginBottom: ri === data.length - 1 ? 0 : 1, width: "100%" }, row.map((cell, ci) => /* @__PURE__ */ React2.createElement(Box2, { key: ci, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2, flexDirection: "column" }, /* @__PURE__ */ React2.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "white" }))))));
|
|
113
138
|
});
|
|
114
139
|
MarkdownText = React2.memo(({ text, color = "white", columns = 80 }) => {
|
|
115
140
|
if (!text) return null;
|
|
@@ -160,9 +185,17 @@ var init_ChatLayout = __esm({
|
|
|
160
185
|
}
|
|
161
186
|
const isUnordered = trimmed.startsWith("* ") || trimmed.startsWith("- ");
|
|
162
187
|
const isOrdered = /^\d+\.\s/.test(trimmed);
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
188
|
+
const isAsciiArt = line.includes("\u2588") || line.includes("\u2554") || line.includes("\u255A") || line.includes("\u2550");
|
|
189
|
+
let content = "";
|
|
190
|
+
if (isAsciiArt) {
|
|
191
|
+
content = line;
|
|
192
|
+
} else if (isUnordered || isOrdered) {
|
|
193
|
+
const bullet = isUnordered ? " \u2022 " : trimmed.match(/^\d+\.\s/)[0];
|
|
194
|
+
const indent = " ".repeat(bullet.length);
|
|
195
|
+
const wrappedPart = wrapText(trimmed.replace(/^[\*\-\d+\.]+\s/, ""), columns - (bullet.length + 6));
|
|
196
|
+
content = bullet + wrappedPart.split("\n").join("\n" + indent);
|
|
197
|
+
} else {
|
|
198
|
+
content = wrapText(trimmed, columns - 4);
|
|
166
199
|
}
|
|
167
200
|
result.push(
|
|
168
201
|
/* @__PURE__ */ React2.createElement(Box2, { key: i, width: "100%" }, /* @__PURE__ */ React2.createElement(InlineMarkdown, { text: content, color }))
|
|
@@ -270,7 +303,10 @@ var init_ChatLayout = __esm({
|
|
|
270
303
|
width: "100%",
|
|
271
304
|
flexDirection: "column"
|
|
272
305
|
},
|
|
273
|
-
|
|
306
|
+
wrapText(
|
|
307
|
+
finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
|
|
308
|
+
columns - 6
|
|
309
|
+
).split("\n").map((line, lineIdx) => /* @__PURE__ */ React2.createElement(Box2, { key: lineIdx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { flexShrink: 0, width: 2 }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, lineIdx === 0 ? "\u276F" : " ")), /* @__PURE__ */ React2.createElement(Box2, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: msg.color || "white", wrap: "anywhere" }, line))))
|
|
274
310
|
) : msg.role === "think" ? /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, "Thinking..."), /* @__PURE__ */ React2.createElement(Box2, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, flexDirection: "column", width: "100%" }, formatThinkText(finalContent))) : /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", paddingX: 1, marginTop: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(CodeRenderer, { text: finalContent, columns }), msg.memoryUpdated && /* @__PURE__ */ React2.createElement(Box2, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { color: "yellow", italic: true }, "\u2728 [Memory Updated]"))));
|
|
275
311
|
});
|
|
276
312
|
ChatLayout = React2.memo(({ messages, showFullThinking, columns = 80 }) => {
|
|
@@ -661,10 +697,9 @@ Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"}
|
|
|
661
697
|
-- END TEMPORAL AWARENESS --
|
|
662
698
|
|
|
663
699
|
-- START FORMATTING RULES --
|
|
664
|
-
- Use markdown.
|
|
665
700
|
- Structure responses VISUALLY pleasing, easy to read, and beautiful.
|
|
666
701
|
- USE GFM Markdown HEAVILY.
|
|
667
|
-
-
|
|
702
|
+
- Use GFM tables for structured data to keep the terminal view organized. CRITICAL POLICY: KEEP SENTENCES IN TABLE **SHORT & CONCISE**. AND MAX 3 COLUMNS.
|
|
668
703
|
- **CRITICAL**: NEVER USE LaTeX IN TERMINAL RESPONSES (exception: file content).
|
|
669
704
|
- Use emojis & Kaomojis.
|
|
670
705
|
-- END FORMATTING RULES --
|
|
@@ -1632,8 +1667,8 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
1632
1667
|
TERMINATION_SIGNAL = false;
|
|
1633
1668
|
let fullAgentResponseChunks = [];
|
|
1634
1669
|
modifiedHistory.forEach((msg) => {
|
|
1635
|
-
if (msg.text) {
|
|
1636
|
-
msg.text = msg.text.replace(/<think>[\s\S]*?<\/think>/
|
|
1670
|
+
if (msg.text && msg.role === "agent") {
|
|
1671
|
+
msg.text = msg.text.replace(/<(think|thought)>[\s\S]*?<\/(think|thought)>/gi, "").trim();
|
|
1637
1672
|
}
|
|
1638
1673
|
});
|
|
1639
1674
|
for (let loop = 0; loop < MAX_LOOPS; loop++) {
|
|
@@ -1677,11 +1712,11 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
1677
1712
|
} else if (retryCount > 0) {
|
|
1678
1713
|
yield { type: "model_update", content: null };
|
|
1679
1714
|
}
|
|
1715
|
+
fs12.writeFileSync("contents.json", JSON.stringify(contents));
|
|
1680
1716
|
stream = await client.models.generateContentStream({
|
|
1681
1717
|
model: targetModel,
|
|
1682
1718
|
contents,
|
|
1683
1719
|
config: {
|
|
1684
|
-
temperature: mode === "Flux" ? 1 : 1.4,
|
|
1685
1720
|
thinkingConfig: {
|
|
1686
1721
|
includeThoughts: false,
|
|
1687
1722
|
thinkingLevel: ThinkingLevel.MINIMAL
|
|
@@ -2311,6 +2346,13 @@ Check what's new using \`/changelog\` command.`,
|
|
|
2311
2346
|
const [chatId, setChatId] = useState6(generateChatId());
|
|
2312
2347
|
const [activeCommand, setActiveCommand] = useState6(null);
|
|
2313
2348
|
const [execOutput, setExecOutput] = useState6("");
|
|
2349
|
+
const terminalEnv = useMemo(() => {
|
|
2350
|
+
const isIDE = process.env.TERM_PROGRAM === "vscode" || !!process.env.VSC_TERMINAL_URL || !!process.env.INTELLIJ_TERMINAL_COMMAND_BLOCKS;
|
|
2351
|
+
return {
|
|
2352
|
+
isIDE,
|
|
2353
|
+
shortcut: isIDE ? "Shift+Enter" : "Ctrl+Enter"
|
|
2354
|
+
};
|
|
2355
|
+
}, []);
|
|
2314
2356
|
const activeCommandRef = useRef(null);
|
|
2315
2357
|
const execOutputRef = useRef("");
|
|
2316
2358
|
useEffect4(() => {
|
|
@@ -2417,15 +2459,12 @@ Check what's new using \`/changelog\` command.`,
|
|
|
2417
2459
|
return;
|
|
2418
2460
|
}
|
|
2419
2461
|
}
|
|
2420
|
-
if (key.tab &&
|
|
2421
|
-
const nextCmd = suggestions[selectedIndex] || suggestions[0];
|
|
2422
|
-
setInput(nextCmd + " ");
|
|
2423
|
-
setSelectedIndex(0);
|
|
2462
|
+
if (key.tab && activeView === "chat") {
|
|
2424
2463
|
}
|
|
2425
2464
|
if (key.ctrl && inputText === "c" && activeView !== "exit") {
|
|
2426
2465
|
setActiveView("exit");
|
|
2427
2466
|
}
|
|
2428
|
-
if (key.return && (key.ctrl || key.meta)) {
|
|
2467
|
+
if (key.return && (key.shift || key.ctrl || key.meta || key.leftAlt || key.rightAlt)) {
|
|
2429
2468
|
setInput((prev) => prev.replace(/\\\r?$/, "").replace(/\r?$/, "") + "\n");
|
|
2430
2469
|
}
|
|
2431
2470
|
});
|
|
@@ -2494,9 +2533,24 @@ Check what's new using \`/changelog\` command.`,
|
|
|
2494
2533
|
{ cmd: "/resume", desc: "Load previous session" },
|
|
2495
2534
|
{ cmd: "/save", desc: "Force save current chat" },
|
|
2496
2535
|
{ cmd: "/chats", desc: "List all chat sessions" },
|
|
2497
|
-
{ cmd: "/mode", desc: "Toggle Flux/Flow modes"
|
|
2498
|
-
|
|
2499
|
-
|
|
2536
|
+
{ cmd: "/mode", desc: "Toggle Flux/Flow modes", subs: [
|
|
2537
|
+
{ cmd: "flux", desc: "Enable Dev toolset" },
|
|
2538
|
+
{ cmd: "flow", desc: "Enable Chat mode" }
|
|
2539
|
+
] },
|
|
2540
|
+
{ cmd: "/thinking", desc: "Set AI reasoning depth", subs: [
|
|
2541
|
+
{ cmd: "low", desc: "Fastest reasoning" },
|
|
2542
|
+
{ cmd: "medium", desc: "Balanced depth" },
|
|
2543
|
+
{ cmd: "high", desc: "Complex coding" },
|
|
2544
|
+
{ cmd: "max", desc: "Architectural depth" },
|
|
2545
|
+
{ cmd: "show", desc: "Show full thoughts" },
|
|
2546
|
+
{ cmd: "hide", desc: "Show concise thoughts" }
|
|
2547
|
+
] },
|
|
2548
|
+
{ cmd: "/model", desc: "Switch AI model", subs: [
|
|
2549
|
+
{ cmd: "gemma-4-31b-it", desc: "Standard Default (Free, Recommended)" },
|
|
2550
|
+
{ cmd: "gemini-3.1-pro-preview", desc: "Most Capable (Paid)" },
|
|
2551
|
+
{ cmd: "gemini-3-flash-preview", desc: "Fast & Lightweight (Paid, Free limited quota)" },
|
|
2552
|
+
{ cmd: "gemini-3.1-flash-lite-preview", desc: "Ultra Fast (Paid, Free limited quota)" }
|
|
2553
|
+
] },
|
|
2500
2554
|
{ cmd: "/settings", desc: "Configure system prefs" },
|
|
2501
2555
|
{ cmd: "/key", desc: "Manage API keys" },
|
|
2502
2556
|
{ cmd: "/profile", desc: "Edit developer persona" },
|
|
@@ -2505,12 +2559,20 @@ Check what's new using \`/changelog\` command.`,
|
|
|
2505
2559
|
{ cmd: "/reset", desc: "Wipe all project data" },
|
|
2506
2560
|
{ cmd: "/about", desc: "Project info & credits" },
|
|
2507
2561
|
{ cmd: "/changelog", desc: "View latest updates" },
|
|
2508
|
-
{ cmd: "/update", desc: "Check/Install updates"
|
|
2562
|
+
{ cmd: "/update", desc: "Check/Install updates", subs: [
|
|
2563
|
+
{ cmd: "check", desc: "Check for new version" },
|
|
2564
|
+
{ cmd: "force", desc: "Force reinstall latest" }
|
|
2565
|
+
] }
|
|
2509
2566
|
];
|
|
2510
2567
|
const handleSubmit = (value) => {
|
|
2511
2568
|
if (suggestions.length > 0) {
|
|
2512
2569
|
const nextMatch = suggestions[selectedIndex] || suggestions[0];
|
|
2513
|
-
|
|
2570
|
+
const parts = value.split(" ");
|
|
2571
|
+
if (parts.length === 1) {
|
|
2572
|
+
setInput(nextMatch.cmd + " ");
|
|
2573
|
+
} else {
|
|
2574
|
+
setInput(parts[0] + " " + nextMatch.cmd + " ");
|
|
2575
|
+
}
|
|
2514
2576
|
setSelectedIndex(0);
|
|
2515
2577
|
return;
|
|
2516
2578
|
}
|
|
@@ -2930,23 +2992,23 @@ Selection: ${val}`,
|
|
|
2930
2992
|
continue;
|
|
2931
2993
|
}
|
|
2932
2994
|
let chunkText = packet.content;
|
|
2933
|
-
if (chunkText.toLowerCase().includes("<think") && !inThinkMode) {
|
|
2995
|
+
if ((chunkText.toLowerCase().includes("<think") || chunkText.toLowerCase().includes("<thought")) && !inThinkMode) {
|
|
2934
2996
|
inThinkMode = true;
|
|
2935
|
-
chunkText = chunkText.replace(/<think>/gi, "");
|
|
2997
|
+
chunkText = chunkText.replace(/<(think|thought)>/gi, "");
|
|
2936
2998
|
currentThinkId = "think-" + Date.now();
|
|
2937
2999
|
setMessages((prev) => [...prev, { id: currentThinkId, role: "think", text: "" }]);
|
|
2938
3000
|
}
|
|
2939
|
-
if (chunkText.toLowerCase().includes("</think>")) {
|
|
2940
|
-
const parts = chunkText.split(/<\/think>/gi);
|
|
3001
|
+
if (chunkText.toLowerCase().includes("</think>") || chunkText.toLowerCase().includes("</thought>")) {
|
|
3002
|
+
const parts = chunkText.split(/<\/(think|thought)>/gi);
|
|
2941
3003
|
const thinkPart = parts[0] || "";
|
|
2942
|
-
const agentPart = parts.slice(
|
|
3004
|
+
const agentPart = parts.slice(2).join("") || "";
|
|
2943
3005
|
setMessages((prev) => {
|
|
2944
3006
|
const newMsgs = prev.map(
|
|
2945
3007
|
(m) => m.id === currentThinkId ? { ...m, text: m.text + thinkPart } : m
|
|
2946
3008
|
);
|
|
2947
3009
|
inThinkMode = false;
|
|
2948
3010
|
currentAgentId = "agent-" + Date.now();
|
|
2949
|
-
return [...newMsgs, { id: currentAgentId, role: "agent", text: agentPart.replace(/<\/?think>/gi, "") }];
|
|
3011
|
+
return [...newMsgs, { id: currentAgentId, role: "agent", text: agentPart.replace(/<\/?(think|thought)>/gi, "") }];
|
|
2950
3012
|
});
|
|
2951
3013
|
continue;
|
|
2952
3014
|
}
|
|
@@ -2975,7 +3037,7 @@ Selection: ${val}`,
|
|
|
2975
3037
|
return newMsgs;
|
|
2976
3038
|
});
|
|
2977
3039
|
} else if (!inThinkMode) {
|
|
2978
|
-
const cleanedText = chunkText.replace(/<\/?think>/gi, "").replace(signalRegex, "");
|
|
3040
|
+
const cleanedText = chunkText.replace(/<\/?(think|thought)>/gi, "").replace(signalRegex, "");
|
|
2979
3041
|
if (!currentAgentId) {
|
|
2980
3042
|
currentAgentId = "agent-" + Date.now();
|
|
2981
3043
|
setMessages((prev) => [...prev, { id: currentAgentId, role: "agent", text: cleanedText }]);
|
|
@@ -3023,8 +3085,23 @@ Selection: ${val}`,
|
|
|
3023
3085
|
setIsExpanded(false);
|
|
3024
3086
|
};
|
|
3025
3087
|
const suggestions = useMemo(() => {
|
|
3026
|
-
if (!input.startsWith("/")
|
|
3027
|
-
|
|
3088
|
+
if (!input.startsWith("/")) return [];
|
|
3089
|
+
const parts = input.split(" ");
|
|
3090
|
+
const query = parts[parts.length - 1].toLowerCase();
|
|
3091
|
+
if (parts.length === 1) {
|
|
3092
|
+
const cleanQuery = query.startsWith("/") ? query.slice(1) : query;
|
|
3093
|
+
return COMMANDS.filter((c) => {
|
|
3094
|
+
const cleanCmd = c.cmd.startsWith("/") ? c.cmd.slice(1) : c.cmd;
|
|
3095
|
+
return cleanCmd.includes(cleanQuery);
|
|
3096
|
+
});
|
|
3097
|
+
}
|
|
3098
|
+
if (parts.length === 2) {
|
|
3099
|
+
const parent = COMMANDS.find((c) => c.cmd === parts[0].toLowerCase());
|
|
3100
|
+
if (parent && parent.subs) {
|
|
3101
|
+
return parent.subs.filter((s) => s.cmd.includes(query));
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
return [];
|
|
3028
3105
|
}, [input]);
|
|
3029
3106
|
useEffect4(() => {
|
|
3030
3107
|
setSelectedIndex(0);
|
|
@@ -3078,7 +3155,7 @@ Selection: ${val}`,
|
|
|
3078
3155
|
CommandMenu,
|
|
3079
3156
|
{
|
|
3080
3157
|
title: "\u{1F916} Select AI Model",
|
|
3081
|
-
items: [{ label: "Gemma 4 31B (Recomended - Default, Use Free Tier Key)", value: "gemma-4-31b-it" }, { label: "Gemini 3.1 Pro (
|
|
3158
|
+
items: [{ label: "Gemma 4 31B (Recomended - Default, Use Free Tier Key)", value: "gemma-4-31b-it" }, { label: "Gemini 3.1 Pro (Best - Req. Paid Key)", value: "gemini-3.1-pro-preview" }, { label: "Gemini 3 Flash (Paid API Key Recomended)", value: "gemini-3-flash-preview" }, { label: "Gemini 3.1 Flash Lite (Fastest - For Quick Tasks ONLY, Limited Free Quota)", value: "gemini-3.1-flash-lite-preview" }, { label: "Cancel", value: "Cancel" }],
|
|
3082
3159
|
onSelect: (item) => {
|
|
3083
3160
|
if (item.value !== "Cancel") setActiveModel(item.value);
|
|
3084
3161
|
setActiveView("chat");
|
|
@@ -3093,7 +3170,6 @@ Selection: ${val}`,
|
|
|
3093
3170
|
items: [
|
|
3094
3171
|
{ label: `Toggle Memory [ ${systemSettings.memory ? "ON" : "OFF"} ]`, value: "memory" },
|
|
3095
3172
|
{ label: `Toggle Auto-Exec [ ${systemSettings.autoExec ? "ON" : "OFF"} ]`, value: "autoExec" },
|
|
3096
|
-
{ label: `Alternate Screen Buffer (Experimental) [ ${systemSettings.useAlternateBuffer ? "ON" : "OFF"} ]`, value: "altBuffer" },
|
|
3097
3173
|
{ label: `External Workspace Access [ ${systemSettings.allowExternalAccess ? "ON" : "OFF"} ]`, value: "externalAccess" },
|
|
3098
3174
|
{ label: `API Tier [ ${apiTier} ]`, value: "apiTier" },
|
|
3099
3175
|
{ label: `Auto-Update [ ${systemSettings.autoUpdate ? "ON" : "OFF"} ]`, value: "autoUpdate" },
|
|
@@ -3543,11 +3619,11 @@ Selection: ${val}`,
|
|
|
3543
3619
|
},
|
|
3544
3620
|
onSubmit: () => setIsExpanded(true),
|
|
3545
3621
|
keyBindings: {
|
|
3546
|
-
submit: (key) => key.return && !key.shift && !key.ctrl,
|
|
3547
|
-
newline: (key) => key.return && key.shift || key.return && key.ctrl
|
|
3622
|
+
submit: (key) => key.return && !key.shift && !key.ctrl && !key.leftAlt && !key.rightAlt,
|
|
3623
|
+
newline: (key) => key.return && key.shift || key.return && key.ctrl || key.return && key.leftAlt || key.return && key.rightAlt
|
|
3548
3624
|
}
|
|
3549
3625
|
}
|
|
3550
|
-
)))) : /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React10.createElement(Box10, { flexShrink: 0, width: 3 }, /* @__PURE__ */ React10.createElement(Text10, { color: "yellow" }, "\u276F ")), /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1, position: "relative" }, input === "" && !isProcessing && /* @__PURE__ */ React10.createElement(Box10, { position: "absolute", paddingLeft: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: "gray"
|
|
3626
|
+
)))) : /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React10.createElement(Box10, { flexShrink: 0, width: 3 }, /* @__PURE__ */ React10.createElement(Text10, { color: "yellow" }, "\u276F ")), /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Box10, { flexGrow: 1, position: "relative" }, input === "" && !isProcessing && /* @__PURE__ */ React10.createElement(Box10, { position: "absolute", paddingLeft: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: "gray" }, escPressed ? " Press ESC again to cancel the request." : ` Type /cmd or message... (${terminalEnv.shortcut} for newline)`)), /* @__PURE__ */ React10.createElement(
|
|
3551
3627
|
MultilineInput,
|
|
3552
3628
|
{
|
|
3553
3629
|
value: input,
|
|
@@ -3555,6 +3631,7 @@ Selection: ${val}`,
|
|
|
3555
3631
|
const cleanVal = val.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\s*\n/g, "\n");
|
|
3556
3632
|
setInput(cleanVal);
|
|
3557
3633
|
},
|
|
3634
|
+
placeholder: escPressed ? " Press ESC again to cancel the request." : ` Type /cmd or message... (${terminalEnv.shortcut} for newline)`,
|
|
3558
3635
|
onSubmit: handleSubmit,
|
|
3559
3636
|
maxRows: 3,
|
|
3560
3637
|
keyBindings: {
|
|
@@ -3611,7 +3688,7 @@ Selection: ${val}`,
|
|
|
3611
3688
|
visible.map((s, i) => {
|
|
3612
3689
|
const actualIdx = startIdx + i;
|
|
3613
3690
|
const isActive = actualIdx === selectedIndex;
|
|
3614
|
-
const cmdText = s.cmd.padEnd(
|
|
3691
|
+
const cmdText = s.cmd.padEnd(32);
|
|
3615
3692
|
return /* @__PURE__ */ React10.createElement(Box10, { key: s.cmd, flexDirection: "row" }, /* @__PURE__ */ React10.createElement(Text10, { color: isActive ? "cyan" : "gray" }, isActive ? "\u276F " : " "), /* @__PURE__ */ React10.createElement(Text10, { color: isActive ? "yellow" : "gray", bold: isActive }, cmdText), /* @__PURE__ */ React10.createElement(Text10, { color: "gray", dimColor: true, italic: true }, s.desc));
|
|
3616
3693
|
}),
|
|
3617
3694
|
suggestions.length > 5 && /* @__PURE__ */ React10.createElement(Box10, { height: 1 }, remaining > 0 && /* @__PURE__ */ React10.createElement(Text10, { color: "gray", dimColor: true }, " ... (", remaining, " more)"))
|
|
@@ -3640,7 +3717,7 @@ var init_app = __esm({
|
|
|
3640
3717
|
init_terminal();
|
|
3641
3718
|
SESSION_START_TIME = Date.now();
|
|
3642
3719
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
3643
|
-
versionFluxflow = "1.3.
|
|
3720
|
+
versionFluxflow = "1.3.6";
|
|
3644
3721
|
updatedOn = "2026-04-29";
|
|
3645
3722
|
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(
|
|
3646
3723
|
CommandMenu,
|