fluxflow-cli 3.2.0 → 3.2.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 +487 -337
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -325,7 +325,8 @@ var init_settings = __esm({
|
|
|
325
325
|
autoDeleteHistory: "7d",
|
|
326
326
|
useExternalData: false,
|
|
327
327
|
externalDataPath: "",
|
|
328
|
-
preserveThinking: true
|
|
328
|
+
preserveThinking: true,
|
|
329
|
+
loadingPhrases: true
|
|
329
330
|
},
|
|
330
331
|
profileData: {
|
|
331
332
|
name: null,
|
|
@@ -3714,7 +3715,7 @@ var init_TerminalBox = __esm({
|
|
|
3714
3715
|
setIsExpanded((prev) => !prev);
|
|
3715
3716
|
}
|
|
3716
3717
|
}, { isActive: isFocused });
|
|
3717
|
-
const limit = Math.max(5, completed ? terminalHeight - 10 : terminalHeight -
|
|
3718
|
+
const limit = Math.max(5, completed ? terminalHeight - 10 : terminalHeight - 25);
|
|
3718
3719
|
const hasCollapsibleContent = rawLines.length > limit;
|
|
3719
3720
|
const collapsedCount = rawLines.length - limit;
|
|
3720
3721
|
const visibleLines = hasCollapsibleContent && !isExpanded ? rawLines.slice(rawLines.length - limit) : rawLines;
|
|
@@ -3725,19 +3726,18 @@ var init_TerminalBox = __esm({
|
|
|
3725
3726
|
{
|
|
3726
3727
|
flexDirection: "column",
|
|
3727
3728
|
borderStyle: isFocused ? "double" : "single",
|
|
3728
|
-
borderLeft:
|
|
3729
|
+
borderLeft: false,
|
|
3729
3730
|
borderRight: false,
|
|
3730
|
-
borderTop:
|
|
3731
|
-
borderBottom:
|
|
3732
|
-
borderColor: "#555555",
|
|
3731
|
+
borderTop: true,
|
|
3732
|
+
borderBottom: true,
|
|
3733
3733
|
paddingLeft: 2,
|
|
3734
3734
|
paddingRight: 0,
|
|
3735
3735
|
paddingY: 1,
|
|
3736
|
-
|
|
3737
|
-
width:
|
|
3736
|
+
marginY: 1,
|
|
3737
|
+
width: columns - 2
|
|
3738
3738
|
},
|
|
3739
|
-
/* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 1, paddingRight: 2 }, /* @__PURE__ */ React3.createElement(Text3, null, /* @__PURE__ */ React3.createElement(Text3, { color: "
|
|
3740
|
-
displayOutput ? /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column", marginTop: 0, backgroundColor: isPty ? void 0 : "#0a0a0a", paddingX: 1 }, hasCollapsibleContent && !isExpanded && /* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1 }, /* @__PURE__ */ React3.createElement(Text3, { color: "magenta" }, "...", collapsedCount, " lines collapsed...
|
|
3739
|
+
/* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 1, paddingRight: 2 }, /* @__PURE__ */ React3.createElement(Text3, null, /* @__PURE__ */ React3.createElement(Text3, { color: "white", bold: true }, completed ? "\u{1F3C1} FINISHED:" : "\u26A1 EXECUTING:", " "), /* @__PURE__ */ React3.createElement(Text3, { color: "white" }, command))), isPty && /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 0, paddingX: 1 }, /* @__PURE__ */ React3.createElement(Text3, { color: "green", bold: true }, "ADVANCE"))),
|
|
3740
|
+
displayOutput ? /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column", marginTop: 0, backgroundColor: isPty ? void 0 : "#0a0a0a", paddingX: 1, width: "100%" }, hasCollapsibleContent && !isExpanded && /* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1 }, /* @__PURE__ */ React3.createElement(Text3, { color: "magenta" }, "...", collapsedCount, " lines collapsed...")), /* @__PURE__ */ React3.createElement(Text3, { color: completed ? void 0 : void 0 }, renderedOutput)) : !completed && /* @__PURE__ */ React3.createElement(Box2, { marginTop: 1, backgroundColor: isPty ? void 0 : "#0a0a0a", paddingX: 1, width: "100%" }, /* @__PURE__ */ React3.createElement(Text3, { color: "white", italic: true }, "Waiting for output...")),
|
|
3741
3741
|
/* @__PURE__ */ React3.createElement(Box2, { justifyContent: "space-between", marginTop: 1 }, !completed ? /* @__PURE__ */ React3.createElement(Text3, { color: "gray", italic: true }, isFocused ? "Press TAB to unfocus, then double-press ESC to terminate." : "Double-press ESC to terminate if hanging.") : /* @__PURE__ */ React3.createElement(Box2, null), /* @__PURE__ */ React3.createElement(Text3, { color: "gray", bold: true }, completed ? "\u25CF ARCHIVED" : isFocused ? "\u25B6 TERMINAL FOCUSED" : "\u25CF LIVE (Press TAB to focus)"))
|
|
3742
3742
|
);
|
|
3743
3743
|
});
|
|
@@ -4031,7 +4031,7 @@ var init_ChatLayout = __esm({
|
|
|
4031
4031
|
const availableWidth = columns - 10;
|
|
4032
4032
|
const trimmed = cleaned.trim();
|
|
4033
4033
|
if (!trimmed.includes("```")) {
|
|
4034
|
-
return /* @__PURE__ */ React4.createElement(Box3, { width: "100%", flexDirection: "column" }, /* @__PURE__ */ React4.createElement(MarkdownText, { text: trimmed, color: "
|
|
4034
|
+
return /* @__PURE__ */ React4.createElement(Box3, { width: "100%", flexDirection: "column" }, /* @__PURE__ */ React4.createElement(MarkdownText, { text: trimmed, color: "#969696", columns: availableWidth, italic: true }));
|
|
4035
4035
|
}
|
|
4036
4036
|
const parts = trimmed.split(/(```\w*\n?[\s\S]*?(?:```|$))/g);
|
|
4037
4037
|
return /* @__PURE__ */ React4.createElement(Box3, { width: "100%", flexDirection: "column" }, parts.map((part, i) => {
|
|
@@ -4208,10 +4208,10 @@ var init_ChatLayout = __esm({
|
|
|
4208
4208
|
const colChars = Math.floor(availableWidth / header.length) - 2;
|
|
4209
4209
|
return (
|
|
4210
4210
|
// Table MarginY here
|
|
4211
|
-
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "#454545ff", paddingX: 1, marginY: 0, width:
|
|
4211
|
+
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "#454545ff", paddingX: 1, marginY: 0, width: terminalWidth - 2 }, /* @__PURE__ */ React4.createElement(Box3, { 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__ */ React4.createElement(Box3, { key: i, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "cyan" })))), data.map((row, ri) => /* @__PURE__ */ React4.createElement(Box3, { key: ri, flexDirection: "row", marginBottom: ri === data.length - 1 ? 0 : 1, width: "100%" }, row.map((cell, ci) => /* @__PURE__ */ React4.createElement(Box3, { key: ci, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2, flexDirection: "column" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "white" }))))))
|
|
4212
4212
|
);
|
|
4213
4213
|
});
|
|
4214
|
-
MarkdownText = React4.memo(({ text, color = "
|
|
4214
|
+
MarkdownText = React4.memo(({ text, color = "#D6DAE3", columns = 80, italic = false }) => {
|
|
4215
4215
|
if (!text) return null;
|
|
4216
4216
|
const lines = text.split("\n");
|
|
4217
4217
|
const result = [];
|
|
@@ -4500,26 +4500,29 @@ var init_ChatLayout = __esm({
|
|
|
4500
4500
|
if (msg.isAskRecord) {
|
|
4501
4501
|
const selectionMatch = msg.text.match(/Selection: (.*)/);
|
|
4502
4502
|
const selection = selectionMatch ? selectionMatch[1] : "No selection";
|
|
4503
|
+
const questionMatch = msg.text.match(/Question: (.*)/);
|
|
4504
|
+
const question = questionMatch ? questionMatch[1] : null;
|
|
4503
4505
|
const s = emojiSpace(2);
|
|
4504
4506
|
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(
|
|
4505
4507
|
Box3,
|
|
4506
4508
|
{
|
|
4507
4509
|
flexDirection: "column",
|
|
4508
4510
|
borderStyle: "single",
|
|
4509
|
-
borderLeft:
|
|
4511
|
+
borderLeft: false,
|
|
4510
4512
|
borderRight: false,
|
|
4511
|
-
borderTop:
|
|
4512
|
-
borderBottom:
|
|
4513
|
+
borderTop: true,
|
|
4514
|
+
borderBottom: true,
|
|
4513
4515
|
borderColor: "#444444",
|
|
4514
4516
|
paddingLeft: 2,
|
|
4515
4517
|
paddingRight: 0,
|
|
4516
4518
|
paddingTop: 1,
|
|
4517
4519
|
paddingBottom: 1,
|
|
4518
|
-
|
|
4519
|
-
width:
|
|
4520
|
+
marginY: 1,
|
|
4521
|
+
width: columns - 2
|
|
4520
4522
|
},
|
|
4521
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "
|
|
4522
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1
|
|
4523
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "green", bold: true }, "AGENT REQUEST: RESOLVED")),
|
|
4524
|
+
question && /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "cyan" }, question)),
|
|
4525
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, "Selection: ", /* @__PURE__ */ React4.createElement(Text4, { color: "grey", bold: true }, selection)))
|
|
4523
4526
|
));
|
|
4524
4527
|
}
|
|
4525
4528
|
if (msg.isAboutRecord) {
|
|
@@ -4632,7 +4635,7 @@ var init_ChatLayout = __esm({
|
|
|
4632
4635
|
finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
|
|
4633
4636
|
columns - 7
|
|
4634
4637
|
).split("\n").map((line, lineIdx) => /* @__PURE__ */ React4.createElement(Box3, { key: lineIdx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexShrink: 0, width: 2 }, /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, lineIdx === 0 ? ">" : " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: line, color: msg.color || "white" }))))
|
|
4635
|
-
), /* @__PURE__ */ React4.createElement(Box3, { width: columns - 1, height: 1, overflow: "hidden" }, /* @__PURE__ */ React4.createElement(Text4, { color: "#444444" }, "\u2580".repeat(Math.max(1, columns - 1))))) : msg.role === "think" ? /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop: 0, marginBottom: 0, paddingX: 1, width: "100%" }, msg.isStreaming && !msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "
|
|
4638
|
+
), /* @__PURE__ */ React4.createElement(Box3, { width: columns - 1, height: 1, overflow: "hidden" }, /* @__PURE__ */ React4.createElement(Text4, { color: "#444444" }, "\u2580".repeat(Math.max(1, columns - 1))))) : msg.role === "think" ? /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop: 0, marginBottom: 0, paddingX: 1, width: "100%" }, msg.isStreaming && !msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2727 Thinking...") : /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2726 Thought", msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, " for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, formatThinkingDuration(msg.duration))) : "..."), /* @__PURE__ */ React4.createElement(Box3, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, paddingTop: 1, paddingBottom: 1, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, marginTop: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: finalContent.replace(/ \|\n\n/g, " |\n"), columns }), msg.memoryUpdated && /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", italic: true }, "[Memory Updated]")), msg.role === "agent" && msg.workedDuration ? /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, marginBottom: 2, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, null, "["), /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "Worked for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, formatThinkingDuration(msg.workedDuration))), /* @__PURE__ */ React4.createElement(Text4, null, "]")) : null))
|
|
4636
4639
|
);
|
|
4637
4640
|
});
|
|
4638
4641
|
BlockItem = React4.memo(({ block, columns = 80, showFullThinking, aiProvider, version }) => {
|
|
@@ -4663,7 +4666,7 @@ var init_ChatLayout = __esm({
|
|
|
4663
4666
|
);
|
|
4664
4667
|
}
|
|
4665
4668
|
if (type === "think-header") {
|
|
4666
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%", marginTop: 0, marginBottom: 0 }, isStreamingMsg ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "
|
|
4669
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%", marginTop: 0, marginBottom: 0 }, isStreamingMsg ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2727 Thinking...") : /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2726 Thought..."), showFullThinking && /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "\u2502 ")));
|
|
4667
4670
|
}
|
|
4668
4671
|
if (type === "think-line") {
|
|
4669
4672
|
if (!showFullThinking) return null;
|
|
@@ -4845,10 +4848,10 @@ var init_StatusBar = __esm({
|
|
|
4845
4848
|
init_text();
|
|
4846
4849
|
activeGetMemoryInfo = null;
|
|
4847
4850
|
getLatencyColor = (delay) => {
|
|
4848
|
-
if (delay <=
|
|
4851
|
+
if (delay <= 370) return "#00a564";
|
|
4849
4852
|
if (delay >= 5e3) return "#ff0000";
|
|
4850
4853
|
const points = [
|
|
4851
|
-
{ t:
|
|
4854
|
+
{ t: 370, r: 0, g: 165, b: 100 },
|
|
4852
4855
|
{ t: 800, r: 120, g: 220, b: 80 },
|
|
4853
4856
|
{ t: 1500, r: 250, g: 210, b: 40 },
|
|
4854
4857
|
{ t: 3e3, r: 255, g: 120, b: 0 },
|
|
@@ -4938,7 +4941,7 @@ var init_StatusBar = __esm({
|
|
|
4938
4941
|
let maxLimit = 262144;
|
|
4939
4942
|
if (aiProvider === "NVIDIA" && (activeModel?.includes("glm") || activeModel?.includes("gpt") || activeModel?.includes("qwen"))) {
|
|
4940
4943
|
maxLimit = 128e3;
|
|
4941
|
-
} else if (aiProvider === "DeepSeek" || aiProvider === "Google" && apiTier === "Paid") {
|
|
4944
|
+
} else if (aiProvider === "DeepSeek" || aiProvider === "Google" && apiTier === "Paid" || aiProvider === "NVIDIA" && activeModel.includes("deepseek")) {
|
|
4942
4945
|
maxLimit = 409600;
|
|
4943
4946
|
}
|
|
4944
4947
|
return /* @__PURE__ */ React5.createElement(
|
|
@@ -5175,7 +5178,7 @@ Internal tools. **MUST use the EXACT syntax** [tool:functions.ToolName(args)]. *
|
|
|
5175
5178
|
- **MAX 3 TOOL CALLS PER TURN${mode === "Flux" ? " (EXCEPTION FOR Todo TOOL: 3+ CALLS ALLOWED, Run TOOL: Limit 1, OR 2 CONSECUTIVE Run TOOL)" : ""}. Next Turn, verify tool results, plan next**
|
|
5176
5179
|
${mode === "Flux" ? "- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 **HIGHLY RECOMMENDED**\n- Tool execution denied? MUST use 'Ask' tool immediately for user reason/changes. NEVER END RESPONSE OR PROCEED BLINDLY \u2190 **MANDATORY**\n- FileMap >>> ReadFile to understand file efficiently\n- Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile\n- HUGE FILES? SearchKeyword >> FileMap/Full Read\n- No tool spamming\n- **MUST MARK DONE/APPEND Todos BASED ON REALTIME TASK PROGRESS ON *EVERY TURN***" : ""}
|
|
5177
5180
|
${mode === "Flux" ? "- **File Tools >> Code in chat**\n\n" : ""}- COMMUNICATION TOOLS -
|
|
5178
|
-
1. [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences
|
|
5181
|
+
1. [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences. 'option' SHOULD be short
|
|
5179
5182
|
|
|
5180
5183
|
- WEB TOOLS -
|
|
5181
5184
|
1. [tool:functions.WebSearch(query="...", limit=number)]. Limit 3-10. Proactive use for unknown info/docs
|
|
@@ -5187,7 +5190,7 @@ ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST A
|
|
|
5187
5190
|
3. [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export, variable
|
|
5188
5191
|
4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 6)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**
|
|
5189
5192
|
5. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports
|
|
5190
|
-
6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit
|
|
5193
|
+
6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional", regex="true/false optional")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit. Optional parameters default to false
|
|
5191
5194
|
7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL ONLY` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
|
|
5192
5195
|
8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASK STRINGS])]. Task List, NO Markdown IN ARRAY. USAGE: ANALYZE USER REQUEST **IF** MULTIPLE TASK \u2192 BREAK DOWN TASK \u2192 CREATE TODO **BEFORE** DIVING IN. 'tasks' & 'markDone' OPTIONAL PARAMETERS WITH method 'get'. USE 'get' method WITH 'markDone' to mark task completed. **EVERY TURN UPDATE POLICY**
|
|
5193
5196
|
9. [tool:functions.Await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
|
|
@@ -5965,6 +5968,7 @@ function SettingsMenu({
|
|
|
5965
5968
|
{ label: "Current Provider", value: "aiProvider", status: aiProvider },
|
|
5966
5969
|
{ label: "Key Strategy", value: "apiTier", status: apiTier === "Free" ? "Free" : quotas?.providerBudgets?.__useProvider ? "Paid" : "Paid" },
|
|
5967
5970
|
{ label: "Preserve Thinking", value: "preserveThinking", status: systemSettings.preserveThinking !== false ? "ON" : "OFF" },
|
|
5971
|
+
{ label: "Loading Phrases", value: "loadingPhrases", status: systemSettings.loadingPhrases !== false ? "ON" : "OFF" },
|
|
5968
5972
|
{ label: "Download Language Parsers", value: "parserDownload", status: "ACTION" }
|
|
5969
5973
|
];
|
|
5970
5974
|
default:
|
|
@@ -6127,6 +6131,12 @@ function SettingsMenu({
|
|
|
6127
6131
|
saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
|
|
6128
6132
|
return newSysSettings;
|
|
6129
6133
|
});
|
|
6134
|
+
} else if (item.value === "loadingPhrases") {
|
|
6135
|
+
setSystemSettings((s) => {
|
|
6136
|
+
const newSysSettings = { ...s, loadingPhrases: s.loadingPhrases === false ? true : false };
|
|
6137
|
+
saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
|
|
6138
|
+
return newSysSettings;
|
|
6139
|
+
});
|
|
6130
6140
|
}
|
|
6131
6141
|
};
|
|
6132
6142
|
return /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%", minHeight: 32 }, /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1, paddingY: 0, marginBottom: 0, borderStyle: "single", borderColor: "gray", width: "100%" }, /* @__PURE__ */ React7.createElement(Text7, { color: "white", bold: true }, "SYSTEM CONFIGURATION")), /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "row", width: "100%", minHeight: 26 }, /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", width: "30%", borderStyle: "round", borderColor: activeColumn === "categories" ? "white" : "grey", padding: 1, paddingY: 0 }, /* @__PURE__ */ React7.createElement(Box6, { marginBottom: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: activeColumn === "categories" ? "white" : "grey", bold: true, underline: true }, "CATEGORIES")), CATEGORIES.map((cat, index) => {
|
|
@@ -6211,7 +6221,7 @@ function SettingsMenu({
|
|
|
6211
6221
|
});
|
|
6212
6222
|
if (currentCatId === "other") {
|
|
6213
6223
|
elements.push(
|
|
6214
|
-
/* @__PURE__ */ React7.createElement(Box6, { key: "pty-notice", marginTop:
|
|
6224
|
+
/* @__PURE__ */ React7.createElement(Box6, { key: "pty-notice", marginTop: 15, paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: "white" }, isPtyAvailable ? "\u2713 Advance Interactive Terminal Supported" : "\u26A0 Interactive Terminal is Limited"))
|
|
6215
6225
|
);
|
|
6216
6226
|
elements.push(
|
|
6217
6227
|
/* @__PURE__ */ React7.createElement(Box6, { key: "memory-load-2026", paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray" }, "Memory Load: ", currentMemory, "/", maxMemory, " ", memoryUnit))
|
|
@@ -6332,7 +6342,13 @@ var init_AskUserModal = __esm({
|
|
|
6332
6342
|
const [isSuggestingElse, setIsSuggestingElse] = useState8(false);
|
|
6333
6343
|
const [customInput, setCustomInput] = useState8("");
|
|
6334
6344
|
const [selectedIndex, setSelectedIndex] = useState8(0);
|
|
6335
|
-
|
|
6345
|
+
let canceled = false;
|
|
6346
|
+
let allOptions = [];
|
|
6347
|
+
try {
|
|
6348
|
+
allOptions = [...options, { id: "CUSTOM", label: "Suggest something else...", description: "Provide a custom response" }];
|
|
6349
|
+
} catch (e) {
|
|
6350
|
+
canceled = true;
|
|
6351
|
+
}
|
|
6336
6352
|
useInput4((input, key) => {
|
|
6337
6353
|
if (isSuggestingElse) return;
|
|
6338
6354
|
if (key.leftArrow || key.upArrow) {
|
|
@@ -6343,10 +6359,11 @@ var init_AskUserModal = __esm({
|
|
|
6343
6359
|
}
|
|
6344
6360
|
if (key.return) {
|
|
6345
6361
|
const selected = allOptions[selectedIndex];
|
|
6346
|
-
if (selected
|
|
6362
|
+
if (selected?.id === "CUSTOM") {
|
|
6347
6363
|
setIsSuggestingElse(true);
|
|
6348
6364
|
} else {
|
|
6349
|
-
onResolve(
|
|
6365
|
+
if (canceled) onResolve("Selected Nothing");
|
|
6366
|
+
else onResolve(selected.label);
|
|
6350
6367
|
}
|
|
6351
6368
|
}
|
|
6352
6369
|
});
|
|
@@ -6369,9 +6386,9 @@ var init_AskUserModal = __esm({
|
|
|
6369
6386
|
backgroundColor: "#1a1a1a",
|
|
6370
6387
|
width: "100%"
|
|
6371
6388
|
},
|
|
6372
|
-
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "white", bold: true }, "
|
|
6389
|
+
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "white", bold: true }, "SUGGEST SOMETHING ELSE")),
|
|
6373
6390
|
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { italic: true, color: "gray" }, "Replying to: ", question)),
|
|
6374
|
-
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, flexDirection: "row" }, /* @__PURE__ */ React9.createElement(
|
|
6391
|
+
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, flexDirection: "row" }, /* @__PURE__ */ React9.createElement(
|
|
6375
6392
|
TextInput3,
|
|
6376
6393
|
{
|
|
6377
6394
|
value: customInput,
|
|
@@ -6386,21 +6403,19 @@ var init_AskUserModal = __esm({
|
|
|
6386
6403
|
Box8,
|
|
6387
6404
|
{
|
|
6388
6405
|
flexDirection: "column",
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
borderRight: false,
|
|
6392
|
-
borderTop: false,
|
|
6393
|
-
borderBottom: false,
|
|
6406
|
+
border: true,
|
|
6407
|
+
borderStyle: "round",
|
|
6394
6408
|
borderColor: "#444444",
|
|
6395
6409
|
paddingLeft: 2,
|
|
6396
6410
|
paddingRight: 0,
|
|
6397
6411
|
paddingTop: 1,
|
|
6398
6412
|
paddingBottom: 1,
|
|
6399
|
-
|
|
6413
|
+
marginY: 1,
|
|
6414
|
+
marginRight: 1,
|
|
6400
6415
|
width: "100%"
|
|
6401
6416
|
},
|
|
6402
|
-
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "
|
|
6403
|
-
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, {
|
|
6417
|
+
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "yellow", bold: true }, "AGENT REQUEST: ACTION REQUIRED")),
|
|
6418
|
+
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "white" }, question)),
|
|
6404
6419
|
/* @__PURE__ */ React9.createElement(Box8, { flexDirection: "column", width: "100%" }, allOptions.map((opt, idx) => {
|
|
6405
6420
|
const isSelected = idx === selectedIndex;
|
|
6406
6421
|
return /* @__PURE__ */ React9.createElement(
|
|
@@ -8890,10 +8905,22 @@ var init_search_keyword = __esm({
|
|
|
8890
8905
|
"src/tools/search_keyword.js"() {
|
|
8891
8906
|
init_arg_parser();
|
|
8892
8907
|
search_keyword = async (args) => {
|
|
8893
|
-
const { keyword, file, subString } = parseArgs(args);
|
|
8908
|
+
const { keyword, file, subString, regex } = parseArgs(args);
|
|
8894
8909
|
if (!keyword) return 'ERROR: Missing "keyword" argument.';
|
|
8895
|
-
const
|
|
8896
|
-
const
|
|
8910
|
+
const toBool = (v) => v === true || v === "true" || v === 1 || v === "1" || v === "yes";
|
|
8911
|
+
const matchRegex = toBool(regex);
|
|
8912
|
+
const matchSubstring = !matchRegex && toBool(subString);
|
|
8913
|
+
let regexPattern;
|
|
8914
|
+
let wordRegex;
|
|
8915
|
+
if (matchRegex) {
|
|
8916
|
+
try {
|
|
8917
|
+
regexPattern = new RegExp(keyword, "i");
|
|
8918
|
+
} catch (e) {
|
|
8919
|
+
return `ERROR: Invalid regex pattern "${keyword}": ${e.message}`;
|
|
8920
|
+
}
|
|
8921
|
+
} else {
|
|
8922
|
+
wordRegex = new RegExp(`(?<![\\w])${keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![\\w])`, "i");
|
|
8923
|
+
}
|
|
8897
8924
|
const excludes = [
|
|
8898
8925
|
"node_modules",
|
|
8899
8926
|
".git",
|
|
@@ -8933,7 +8960,7 @@ var init_search_keyword = __esm({
|
|
|
8933
8960
|
const lines = content.split(/\r?\n/);
|
|
8934
8961
|
const fileMatches = [];
|
|
8935
8962
|
for (let i = 0; i < lines.length; i++) {
|
|
8936
|
-
const matched = matchSubstring ? lines[i].toLowerCase().includes(keyword.toLowerCase()) || fuzzyMatch(lines[i], keyword) : wordRegex.test(lines[i]);
|
|
8963
|
+
const matched = matchRegex ? regexPattern.test(lines[i]) : matchSubstring ? lines[i].toLowerCase().includes(keyword.toLowerCase()) || fuzzyMatch(lines[i], keyword) : wordRegex.test(lines[i]);
|
|
8937
8964
|
if (matched) {
|
|
8938
8965
|
fileMatches.push({ line: i + 1, content: lines[i].trim() });
|
|
8939
8966
|
}
|
|
@@ -8959,10 +8986,11 @@ var init_search_keyword = __esm({
|
|
|
8959
8986
|
if (typeof global.gc === "function") {
|
|
8960
8987
|
global.gc();
|
|
8961
8988
|
}
|
|
8989
|
+
const modeLabel = matchRegex ? "(regex mode)" : matchSubstring ? "(subString mode)" : "";
|
|
8962
8990
|
if (fileGroups.length === 0) {
|
|
8963
|
-
return `Found 0 matches for keyword: "${keyword}"${file ? ` in file: ${file}` : ". Try to specify files"} ${
|
|
8991
|
+
return `Found 0 matches for keyword: "${keyword}"${file ? ` in file: ${file}` : ". Try to specify files"} ${modeLabel}`;
|
|
8964
8992
|
}
|
|
8965
|
-
let output = `Found ${totalMatches} match${totalMatches === 1 ? "" : "es"} across ${fileGroups.length} file${fileGroups.length === 1 ? "" : "s"} ${
|
|
8993
|
+
let output = `Found ${totalMatches} match${totalMatches === 1 ? "" : "es"} across ${fileGroups.length} file${fileGroups.length === 1 ? "" : "s"} ${modeLabel}:
|
|
8966
8994
|
|
|
8967
8995
|
`;
|
|
8968
8996
|
for (const group of fileGroups) {
|
|
@@ -11036,80 +11064,104 @@ var init_ai = __esm({
|
|
|
11036
11064
|
body.chat_template_kwargs = { enable_thinking: false };
|
|
11037
11065
|
}
|
|
11038
11066
|
}
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
let lastFlushTime = Date.now();
|
|
11060
|
-
let hasNewData = false;
|
|
11061
|
-
while (true) {
|
|
11062
|
-
const { done, value } = await reader.read();
|
|
11063
|
-
if (done) {
|
|
11064
|
-
if (hasNewData && (pendingParts.length > 0 || latestUsageMetadata)) {
|
|
11065
|
-
yield {
|
|
11066
|
-
candidates: pendingParts.length > 0 ? [{ content: { parts: pendingParts } }] : [],
|
|
11067
|
-
usageMetadata: latestUsageMetadata
|
|
11068
|
-
};
|
|
11067
|
+
let attempts = 0;
|
|
11068
|
+
const maxAttempts = 6;
|
|
11069
|
+
let hasYielded = false;
|
|
11070
|
+
while (attempts < maxAttempts) {
|
|
11071
|
+
attempts++;
|
|
11072
|
+
try {
|
|
11073
|
+
const response = await fetchWithBackoff("https://integrate.api.nvidia.com/v1/chat/completions", {
|
|
11074
|
+
method: "POST",
|
|
11075
|
+
headers: {
|
|
11076
|
+
"Content-Type": "application/json",
|
|
11077
|
+
"Authorization": `Bearer ${apiKey}`
|
|
11078
|
+
},
|
|
11079
|
+
body: JSON.stringify(body),
|
|
11080
|
+
signal
|
|
11081
|
+
});
|
|
11082
|
+
if (!response.ok) {
|
|
11083
|
+
const err = await response.json();
|
|
11084
|
+
const error = new Error(`NVIDIA API Error: ${err.error?.message || response.statusText}`);
|
|
11085
|
+
error.status = response.status;
|
|
11086
|
+
throw error;
|
|
11069
11087
|
}
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
totalTokenCount: usage.total_tokens || usage.prompt_tokens + usage.completion_tokens,
|
|
11085
|
-
promptTokenCount: usage.prompt_tokens || 0,
|
|
11086
|
-
candidatesTokenCount: usage.completion_tokens || 0,
|
|
11087
|
-
thoughtsTokenCount: (usage.completion_tokens_details?.reasoning_tokens || 0) + (usage.completion_tokens_details?.thoughts_tokens || 0)
|
|
11088
|
+
const reader = response.body.getReader();
|
|
11089
|
+
const decoder = new TextDecoder();
|
|
11090
|
+
let buffer = "";
|
|
11091
|
+
let pendingParts = [];
|
|
11092
|
+
let latestUsageMetadata = null;
|
|
11093
|
+
let lastFlushTime = Date.now();
|
|
11094
|
+
let hasNewData = false;
|
|
11095
|
+
while (true) {
|
|
11096
|
+
const { done, value } = await reader.read();
|
|
11097
|
+
if (done) {
|
|
11098
|
+
if (hasNewData && (pendingParts.length > 0 || latestUsageMetadata)) {
|
|
11099
|
+
yield {
|
|
11100
|
+
candidates: pendingParts.length > 0 ? [{ content: { parts: pendingParts } }] : [],
|
|
11101
|
+
usageMetadata: latestUsageMetadata
|
|
11088
11102
|
};
|
|
11089
|
-
|
|
11090
|
-
}
|
|
11091
|
-
const thinking = json.choices?.[0]?.delta?.reasoning || json.choices?.[0]?.delta?.reasoning_content || "";
|
|
11092
|
-
const content = json.choices?.[0]?.delta?.content || "";
|
|
11093
|
-
if (thinking) {
|
|
11094
|
-
pendingParts.push({ text: thinking, thought: true });
|
|
11095
|
-
hasNewData = true;
|
|
11103
|
+
hasYielded = true;
|
|
11096
11104
|
}
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11105
|
+
break;
|
|
11106
|
+
}
|
|
11107
|
+
buffer += decoder.decode(value, { stream: true });
|
|
11108
|
+
const lines = buffer.split("\n");
|
|
11109
|
+
buffer = lines.pop();
|
|
11110
|
+
for (const line of lines) {
|
|
11111
|
+
const trimmed = line.trim();
|
|
11112
|
+
if (!trimmed || trimmed === "data: [DONE]") continue;
|
|
11113
|
+
if (trimmed.startsWith("data: ")) {
|
|
11114
|
+
let json;
|
|
11115
|
+
try {
|
|
11116
|
+
json = JSON.parse(trimmed.substring(6));
|
|
11117
|
+
} catch (e) {
|
|
11118
|
+
continue;
|
|
11119
|
+
}
|
|
11120
|
+
if (json.error) {
|
|
11121
|
+
throw new Error(`NVIDIA Stream Error: ${json.error.message || JSON.stringify(json.error)}`);
|
|
11122
|
+
}
|
|
11123
|
+
try {
|
|
11124
|
+
const usage = json.usage;
|
|
11125
|
+
if (usage) {
|
|
11126
|
+
latestUsageMetadata = {
|
|
11127
|
+
totalTokenCount: usage.total_tokens || usage.prompt_tokens + usage.completion_tokens,
|
|
11128
|
+
promptTokenCount: usage.prompt_tokens || 0,
|
|
11129
|
+
candidatesTokenCount: usage.completion_tokens || 0,
|
|
11130
|
+
thoughtsTokenCount: (usage.completion_tokens_details?.reasoning_tokens || 0) + (usage.completion_tokens_details?.thoughts_tokens || 0)
|
|
11131
|
+
};
|
|
11132
|
+
hasNewData = true;
|
|
11133
|
+
}
|
|
11134
|
+
const thinking = json.choices?.[0]?.delta?.reasoning || json.choices?.[0]?.delta?.reasoning_content || "";
|
|
11135
|
+
const content = json.choices?.[0]?.delta?.content || "";
|
|
11136
|
+
if (thinking) {
|
|
11137
|
+
pendingParts.push({ text: thinking, thought: true });
|
|
11138
|
+
hasNewData = true;
|
|
11139
|
+
}
|
|
11140
|
+
if (content) {
|
|
11141
|
+
pendingParts.push({ text: content });
|
|
11142
|
+
hasNewData = true;
|
|
11143
|
+
}
|
|
11144
|
+
} catch (e) {
|
|
11145
|
+
}
|
|
11100
11146
|
}
|
|
11101
|
-
}
|
|
11147
|
+
}
|
|
11148
|
+
if (Date.now() - lastFlushTime >= 350 && hasNewData) {
|
|
11149
|
+
yield {
|
|
11150
|
+
candidates: pendingParts.length > 0 ? [{ content: { parts: [...pendingParts] } }] : [],
|
|
11151
|
+
usageMetadata: latestUsageMetadata
|
|
11152
|
+
};
|
|
11153
|
+
hasYielded = true;
|
|
11154
|
+
pendingParts = [];
|
|
11155
|
+
lastFlushTime = Date.now();
|
|
11156
|
+
hasNewData = false;
|
|
11102
11157
|
}
|
|
11103
11158
|
}
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
pendingParts = [];
|
|
11111
|
-
lastFlushTime = Date.now();
|
|
11112
|
-
hasNewData = false;
|
|
11159
|
+
break;
|
|
11160
|
+
} catch (error) {
|
|
11161
|
+
if (hasYielded || attempts >= maxAttempts) {
|
|
11162
|
+
throw error;
|
|
11163
|
+
}
|
|
11164
|
+
await new Promise((resolve) => setTimeout(resolve, 3500));
|
|
11113
11165
|
}
|
|
11114
11166
|
}
|
|
11115
11167
|
};
|
|
@@ -11138,7 +11190,7 @@ var init_ai = __esm({
|
|
|
11138
11190
|
if (data && data.queues && data.queues[0] && typeof data.queues[0].queueDepth === "number") {
|
|
11139
11191
|
const depth = data.queues[0].queueDepth;
|
|
11140
11192
|
if (!isStreamingStarted) {
|
|
11141
|
-
push({ value: { type: "status", content: `Queue
|
|
11193
|
+
push({ value: { type: "status", content: `Queue ${depth || 1}` }, done: false });
|
|
11142
11194
|
}
|
|
11143
11195
|
}
|
|
11144
11196
|
}
|
|
@@ -12030,14 +12082,14 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
12030
12082
|
return { text: fullText, usageMetadata };
|
|
12031
12083
|
});
|
|
12032
12084
|
};
|
|
12033
|
-
consolidatePastMemories = async (currentChatId, settings) => {
|
|
12085
|
+
consolidatePastMemories = async (currentChatId, settings, tempStorage = null) => {
|
|
12034
12086
|
try {
|
|
12035
12087
|
const { aiProvider = "Google" } = settings;
|
|
12036
|
-
const
|
|
12037
|
-
const totalMemoriesCount = Object.values(
|
|
12038
|
-
if (totalMemoriesCount <=
|
|
12039
|
-
const chatsToSummarize = Object.keys(
|
|
12040
|
-
return id !== currentChatId && Array.isArray(
|
|
12088
|
+
const tempStorage2 = tempStorage2 || readEncryptedJson(TEMP_MEM_FILE, {});
|
|
12089
|
+
const totalMemoriesCount = Object.values(tempStorage2).flat().length;
|
|
12090
|
+
if (totalMemoriesCount <= 5) return;
|
|
12091
|
+
const chatsToSummarize = Object.keys(tempStorage2).filter((id) => {
|
|
12092
|
+
return id !== currentChatId && Array.isArray(tempStorage2[id]) && tempStorage2[id].length > 2;
|
|
12041
12093
|
});
|
|
12042
12094
|
if (chatsToSummarize.length === 0) return;
|
|
12043
12095
|
let prompt = `You are a silent background process for the FluxFlow CLI Agent.
|
|
@@ -12058,7 +12110,7 @@ Chats to process:
|
|
|
12058
12110
|
`;
|
|
12059
12111
|
const cacheStorage = readEncryptedJson(TEMP_MEM_CHAT_FILE, {});
|
|
12060
12112
|
for (const id of chatsToSummarize) {
|
|
12061
|
-
const rawMemories =
|
|
12113
|
+
const rawMemories = tempStorage2[id];
|
|
12062
12114
|
const newMemoryListStr = rawMemories.map((m) => `- ${m}`).join("\n");
|
|
12063
12115
|
const oldSummary = cacheStorage[id];
|
|
12064
12116
|
prompt += `[Chat ID: ${id}]
|
|
@@ -12288,8 +12340,12 @@ Provide a consolidated summary of the entire session.`;
|
|
|
12288
12340
|
}
|
|
12289
12341
|
}
|
|
12290
12342
|
if (isFirstPrompt && isMemoryEnabled) {
|
|
12291
|
-
|
|
12292
|
-
|
|
12343
|
+
const tempStorage2 = readEncryptedJson(TEMP_MEM_FILE, {});
|
|
12344
|
+
const totalMemoriesCount = Object.values(tempStorage2).flat().length;
|
|
12345
|
+
if (totalMemoriesCount > 5) {
|
|
12346
|
+
yield { type: "status", content: "Condensing past chat memories" };
|
|
12347
|
+
await consolidatePastMemories(chatId, settings, tempStorage2);
|
|
12348
|
+
}
|
|
12293
12349
|
}
|
|
12294
12350
|
const tempStorage = readEncryptedJson(TEMP_MEM_FILE, {});
|
|
12295
12351
|
const cacheStorage = readEncryptedJson(TEMP_MEM_CHAT_FILE, {});
|
|
@@ -12528,7 +12584,7 @@ Provide a consolidated summary of the entire session.`;
|
|
|
12528
12584
|
return result;
|
|
12529
12585
|
};
|
|
12530
12586
|
yield { type: "status", content: "[start]" };
|
|
12531
|
-
yield { type: "status", content: "Gathering Context
|
|
12587
|
+
yield { type: "status", content: "Gathering Context" };
|
|
12532
12588
|
const totalFolders = countFolders(process.cwd());
|
|
12533
12589
|
let dynamicMaxDepth = 12;
|
|
12534
12590
|
if (totalFolders > 4096) dynamicMaxDepth = 1;
|
|
@@ -12858,7 +12914,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
12858
12914
|
let lastUsage = null;
|
|
12859
12915
|
const MAX_LOOPS = mode === "Flux" ? 100 : 10;
|
|
12860
12916
|
const MAX_RETRIES = 16;
|
|
12861
|
-
yield { type: "status", content: "Connecting
|
|
12917
|
+
yield { type: "status", content: "Connecting" };
|
|
12862
12918
|
TERMINATION_SIGNAL = false;
|
|
12863
12919
|
let fullAgentResponseChunks = [];
|
|
12864
12920
|
let wasToolCalledInLastLoop = false;
|
|
@@ -12875,7 +12931,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
12875
12931
|
modifiedHistory = getTruncatedHistory(modifiedHistory, 6);
|
|
12876
12932
|
}
|
|
12877
12933
|
if (loop > 0) {
|
|
12878
|
-
yield { type: "status", content: "Working
|
|
12934
|
+
yield { type: "status", content: "Working" };
|
|
12879
12935
|
}
|
|
12880
12936
|
if (TERMINATION_SIGNAL) {
|
|
12881
12937
|
yield { type: "status", content: "Request Cancelled" };
|
|
@@ -13030,15 +13086,15 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
13030
13086
|
currentSystemInstruction = getSystemInstruction(profile, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ? thinkingLevel : thinkingLevel, mode, systemSettings, isMemoryEnabled, isFirstPrompt, aiProvider, aiProvider === "Google" ? true : isMultiModal, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ? true : false);
|
|
13031
13087
|
const lastUserMsg = contents[contents.length - 1];
|
|
13032
13088
|
if (isBridgeConnected() & loop > 0) {
|
|
13033
|
-
yield { type: "status", content: "Verifying..." };
|
|
13034
13089
|
await new Promise((resolve) => setTimeout(resolve, 2500));
|
|
13090
|
+
yield { type: "status", content: "Verifying" };
|
|
13035
13091
|
const ideCtxJIT = await getIDEContext();
|
|
13036
13092
|
const ideErr = ideCtxJIT ? ideCtxJIT.diagnostics : null;
|
|
13037
13093
|
if (ideErr && lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text) {
|
|
13038
13094
|
lastUserMsg.parts[0].text += `
|
|
13039
13095
|
${ideErr} [/ERROR]`;
|
|
13040
13096
|
}
|
|
13041
|
-
yield { type: "status", content: "Working
|
|
13097
|
+
yield { type: "status", content: "Working" };
|
|
13042
13098
|
}
|
|
13043
13099
|
const isGemma = modelName && modelName.toLowerCase().startsWith("gemma") && aiProvider === "Google";
|
|
13044
13100
|
if (isGemma) {
|
|
@@ -13337,7 +13393,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13337
13393
|
settings.onTokenChunk();
|
|
13338
13394
|
}
|
|
13339
13395
|
if (isFirstChunk) {
|
|
13340
|
-
yield { type: "status", content: "Thinking
|
|
13396
|
+
yield { type: "status", content: "Thinking" };
|
|
13341
13397
|
isFirstChunk = false;
|
|
13342
13398
|
}
|
|
13343
13399
|
if (TERMINATION_SIGNAL) {
|
|
@@ -13493,11 +13549,11 @@ ${ideErr} [/ERROR]`;
|
|
|
13493
13549
|
}
|
|
13494
13550
|
}
|
|
13495
13551
|
}
|
|
13496
|
-
const currentLabel = `${TOOL_LABELS2[potentialTool] || potentialTool}${detail ? `
|
|
13552
|
+
const currentLabel = `${TOOL_LABELS2[potentialTool] || potentialTool}${detail ? ` ${detail}` : ""}`;
|
|
13497
13553
|
if (potentialTool !== lastToolSniffed || detail !== lastToolDetail) {
|
|
13498
13554
|
lastToolSniffed = potentialTool;
|
|
13499
13555
|
lastToolDetail = detail;
|
|
13500
|
-
yield { type: "status", content: `${currentLabel}
|
|
13556
|
+
yield { type: "status", content: `${currentLabel}` };
|
|
13501
13557
|
if (process.stdout.isTTY) {
|
|
13502
13558
|
const TOOL_TITLES = {
|
|
13503
13559
|
"WebSearch": "Searching",
|
|
@@ -13673,7 +13729,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13673
13729
|
const normToolName = NORMALIZE_MAP[toolCall.toolName] || toolCall.toolName;
|
|
13674
13730
|
const displayLabel = TOOL_LABELS2[normToolName] || toolCall.toolName;
|
|
13675
13731
|
const detail = getToolDetail(normToolName, toolCall.args);
|
|
13676
|
-
yield { type: "status", content: `${displayLabel}${detail ? `
|
|
13732
|
+
yield { type: "status", content: `${displayLabel}${detail ? ` ${detail}` : ""}` };
|
|
13677
13733
|
let label = "";
|
|
13678
13734
|
if (normToolName === "web_search") {
|
|
13679
13735
|
const { query, limit = 10 } = parseArgs(toolCall.args);
|
|
@@ -14176,7 +14232,7 @@ ${boxMid}}`) };
|
|
|
14176
14232
|
continue;
|
|
14177
14233
|
}
|
|
14178
14234
|
}
|
|
14179
|
-
yield { type: "status", content: `Opening Diff in IDE: ${path21.basename(absPath)}
|
|
14235
|
+
yield { type: "status", content: `Opening Diff in IDE: ${path21.basename(absPath)}` };
|
|
14180
14236
|
showDiffInIDE(absPath, originalContent, modifiedContent);
|
|
14181
14237
|
diffOpened = true;
|
|
14182
14238
|
await new Promise((r) => setTimeout(r, 50));
|
|
@@ -14188,7 +14244,7 @@ ${boxMid}}`) };
|
|
|
14188
14244
|
fs22.mkdirSync(path21.dirname(absPath), { recursive: true });
|
|
14189
14245
|
fs22.writeFileSync(absPath, "", "utf8");
|
|
14190
14246
|
}
|
|
14191
|
-
yield { type: "status", content: `Opening New File Diff in IDE: ${path21.basename(absPath)}
|
|
14247
|
+
yield { type: "status", content: `Opening New File Diff in IDE: ${path21.basename(absPath)}` };
|
|
14192
14248
|
showDiffInIDE(absPath, "", modifiedContent);
|
|
14193
14249
|
diffOpened = true;
|
|
14194
14250
|
await new Promise((r) => setTimeout(r, 50));
|
|
@@ -14748,13 +14804,13 @@ Error Log can be found in ${path21.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
14748
14804
|
accumulatedContext = "";
|
|
14749
14805
|
const waitTime = Math.min(1e3 * Math.pow(2, retryCount - 1), 32e3);
|
|
14750
14806
|
isInitialAttempt = true;
|
|
14751
|
-
yield { type: "status", content: `Trying to reach ${modelName} (${retryCount}/${MAX_RETRIES}) [Retrying in ${(waitTime / 1e3).toFixed(0)}s]
|
|
14807
|
+
yield { type: "status", content: `Trying to reach ${modelName} (${retryCount}/${MAX_RETRIES}) [Retrying in ${(waitTime / 1e3).toFixed(0)}s]` };
|
|
14752
14808
|
for (let i = waitTime / 1e3; i > 0; i--) {
|
|
14753
14809
|
if (TERMINATION_SIGNAL) break;
|
|
14754
|
-
yield { type: "status", content: `Trying to reach ${modelName} (${retryCount}/${MAX_RETRIES}) [Retrying in ${i}s]
|
|
14810
|
+
yield { type: "status", content: `Trying to reach ${modelName} (${retryCount}/${MAX_RETRIES}) [Retrying in ${i}s]` };
|
|
14755
14811
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
14756
14812
|
}
|
|
14757
|
-
yield { type: "status", content: `Trying to reach ${modelName}
|
|
14813
|
+
yield { type: "status", content: `Trying to reach ${modelName}` };
|
|
14758
14814
|
} else {
|
|
14759
14815
|
throw new Error(`Model ${modelName} cannot be reached. (Failed ${MAX_RETRIES} times)
|
|
14760
14816
|
Error Log can be found in ${path21.join(LOGS_DIR, "agent", "error.log")}`);
|
|
@@ -14785,7 +14841,7 @@ Error Log can be found in ${path21.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
14785
14841
|
const hasFinish = /\[\s*(turn\s*:)?\s*finish\s*\]/i.test(signalSafeText.toLowerCase()) || /\[\[END\]\]/i.test(signalSafeText.toLowerCase()) || true;
|
|
14786
14842
|
const hasContinue = /\[\s*(turn\s*:)?\s*continue\s*\]/i.test(signalSafeText.toLowerCase());
|
|
14787
14843
|
const shouldContinue = toolCallPointer > 0;
|
|
14788
|
-
yield { type: "status", content: "Thinking
|
|
14844
|
+
yield { type: "status", content: "Thinking" };
|
|
14789
14845
|
const cleanedTurnText = contextSafeReplace(turnText, /(\[\s*(turn\s*:)?\s*(continue|finish)\s*\]|\[\[END\]\])/gi, "").trim();
|
|
14790
14846
|
let isActuallyFinished = (hasFinish || toolResults.length === 0) && !isThinkingLoop && !isStutteringLoop && !isGeneralLoop;
|
|
14791
14847
|
isActuallyFinished = toolResults.length === 0 ? isActuallyFinished : false;
|
|
@@ -14900,7 +14956,7 @@ Error Log can be found in ${path21.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
14900
14956
|
"searchkeyword": '- [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false")]. Global project text search',
|
|
14901
14957
|
"websearch": '- [tool:functions.WebSearch(query="...", limit=number)]. Web Search',
|
|
14902
14958
|
"webscrape": '- [tool:functions.WebScrape(url="...")]. Web Scrape',
|
|
14903
|
-
"ask": `- [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences`
|
|
14959
|
+
"ask": `- [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences. 'option' SHOULD be short`
|
|
14904
14960
|
};
|
|
14905
14961
|
const providedToolsSection = `-- TOOL DEFINITIONS (path = relative to CWD, path separator: '/') --
|
|
14906
14962
|
To call tools USE THIS EXACT SYNTAX: [tool:functions.ToolName(args)]. **NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
|
|
@@ -15797,7 +15853,7 @@ var init_witty_phrases = __esm({
|
|
|
15797
15853
|
"Letting the thoughts marinate",
|
|
15798
15854
|
"Just remembered where I put my keys",
|
|
15799
15855
|
"Pondering the orb",
|
|
15800
|
-
"I've seen things you people wouldn't believe
|
|
15856
|
+
// "I've seen things you people wouldn't believe… like a user who reads loading messages.",
|
|
15801
15857
|
"Initiating thoughtful gaze",
|
|
15802
15858
|
"What's a computer's favorite snack? Microchips.",
|
|
15803
15859
|
"Why do Java developers wear glasses? Because they don't C#.",
|
|
@@ -15816,7 +15872,8 @@ var init_witty_phrases = __esm({
|
|
|
15816
15872
|
"Pretty sure there's a cat walking on the keyboard somewhere",
|
|
15817
15873
|
"Enhancing\u2026 Enhancing\u2026 Still loading.",
|
|
15818
15874
|
"It's not a bug, it's a feature\u2026 of this loading screen.",
|
|
15819
|
-
"Have you tried turning it off and on again?
|
|
15875
|
+
"Have you tried turning it off and on again?",
|
|
15876
|
+
// 'Have you tried turning it off and on again? (The loading screen, not me.)',
|
|
15820
15877
|
"Constructing additional pylons",
|
|
15821
15878
|
"New line? That\u2019s Ctrl+J.",
|
|
15822
15879
|
"Releasing the HypnoDrones",
|
|
@@ -15951,14 +16008,68 @@ var init_setup = __esm({
|
|
|
15951
16008
|
}
|
|
15952
16009
|
});
|
|
15953
16010
|
|
|
16011
|
+
// src/components/GlintText.jsx
|
|
16012
|
+
import React15, { useState as useState14, useEffect as useEffect11 } from "react";
|
|
16013
|
+
import { Text as Text15 } from "ink";
|
|
16014
|
+
var GlintText, GlintText_default;
|
|
16015
|
+
var init_GlintText = __esm({
|
|
16016
|
+
"src/components/GlintText.jsx"() {
|
|
16017
|
+
GlintText = ({
|
|
16018
|
+
text,
|
|
16019
|
+
baseColor = "grey",
|
|
16020
|
+
glintColor = "gray",
|
|
16021
|
+
speed = 200,
|
|
16022
|
+
glintWidth = 6,
|
|
16023
|
+
typeSpeed = 30,
|
|
16024
|
+
// 👈 New prop! How fast it backspaces and types! ⌨️
|
|
16025
|
+
...props
|
|
16026
|
+
}) => {
|
|
16027
|
+
const [position, setPosition] = useState14(-glintWidth);
|
|
16028
|
+
const [displayedText, setDisplayedText] = useState14(text);
|
|
16029
|
+
useEffect11(() => {
|
|
16030
|
+
const timer = setInterval(() => {
|
|
16031
|
+
setPosition((prev) => prev > displayedText.length + glintWidth ? -glintWidth - 40 : prev + 1);
|
|
16032
|
+
}, speed);
|
|
16033
|
+
return () => clearInterval(timer);
|
|
16034
|
+
}, [displayedText.length, speed, glintWidth]);
|
|
16035
|
+
useEffect11(() => {
|
|
16036
|
+
if (text && text.includes("Trying to reach") && displayedText && displayedText.includes("Trying to reach")) {
|
|
16037
|
+
setDisplayedText(text);
|
|
16038
|
+
return;
|
|
16039
|
+
}
|
|
16040
|
+
if (displayedText === text) return;
|
|
16041
|
+
const timer = setTimeout(() => {
|
|
16042
|
+
let commonLen = 0;
|
|
16043
|
+
const minLen = Math.min(displayedText.length, text.length);
|
|
16044
|
+
while (commonLen < minLen && displayedText[commonLen] === text[commonLen]) {
|
|
16045
|
+
commonLen++;
|
|
16046
|
+
}
|
|
16047
|
+
if (displayedText.length > commonLen) {
|
|
16048
|
+
setDisplayedText((prev) => prev.slice(0, -1));
|
|
16049
|
+
} else if (displayedText.length < text.length) {
|
|
16050
|
+
setDisplayedText(text.slice(0, displayedText.length + 1));
|
|
16051
|
+
}
|
|
16052
|
+
}, typeSpeed);
|
|
16053
|
+
return () => clearTimeout(timer);
|
|
16054
|
+
}, [text, displayedText, typeSpeed]);
|
|
16055
|
+
return /* @__PURE__ */ React15.createElement(Text15, null, displayedText.split("").map((char, index) => {
|
|
16056
|
+
const distance = Math.abs(index - position);
|
|
16057
|
+
const color = distance <= glintWidth / 2 ? glintColor : baseColor;
|
|
16058
|
+
return /* @__PURE__ */ React15.createElement(Text15, { key: index, color, ...props }, char);
|
|
16059
|
+
}));
|
|
16060
|
+
};
|
|
16061
|
+
GlintText_default = GlintText;
|
|
16062
|
+
}
|
|
16063
|
+
});
|
|
16064
|
+
|
|
15954
16065
|
// src/app.jsx
|
|
15955
16066
|
var app_exports = {};
|
|
15956
16067
|
__export(app_exports, {
|
|
15957
16068
|
default: () => App
|
|
15958
16069
|
});
|
|
15959
16070
|
import os5 from "os";
|
|
15960
|
-
import
|
|
15961
|
-
import { Box as Box14, Text as
|
|
16071
|
+
import React16, { useState as useState15, useEffect as useEffect12, useRef as useRef4, useMemo as useMemo2 } from "react";
|
|
16072
|
+
import { Box as Box14, Text as Text16, useInput as useInput9, useStdout as useStdout2, Static } from "ink";
|
|
15962
16073
|
import fs24 from "fs-extra";
|
|
15963
16074
|
import path22 from "path";
|
|
15964
16075
|
import { exec as exec2 } from "child_process";
|
|
@@ -15968,24 +16079,24 @@ import SelectInput2 from "ink-select-input";
|
|
|
15968
16079
|
import gradient2 from "gradient-string";
|
|
15969
16080
|
function App({ args = [] }) {
|
|
15970
16081
|
let lastGCTime = 1;
|
|
15971
|
-
const [confirmExit, setConfirmExit] =
|
|
15972
|
-
const [exitCountdown, setExitCountdown] =
|
|
16082
|
+
const [confirmExit, setConfirmExit] = useState15(false);
|
|
16083
|
+
const [exitCountdown, setExitCountdown] = useState15(10);
|
|
15973
16084
|
const { stdout } = useStdout2();
|
|
15974
|
-
const [input, setInput] =
|
|
15975
|
-
const [inputKey, setInputKey] =
|
|
15976
|
-
const [isExpanded, setIsExpanded] =
|
|
15977
|
-
const [mode, setMode] =
|
|
15978
|
-
const [terminalSize, setTerminalSize] =
|
|
16085
|
+
const [input, setInput] = useState15("");
|
|
16086
|
+
const [inputKey, setInputKey] = useState15(0);
|
|
16087
|
+
const [isExpanded, setIsExpanded] = useState15(false);
|
|
16088
|
+
const [mode, setMode] = useState15("Flux");
|
|
16089
|
+
const [terminalSize, setTerminalSize] = useState15({
|
|
15979
16090
|
columns: stdout?.columns || 80,
|
|
15980
16091
|
rows: stdout?.rows || 24
|
|
15981
16092
|
});
|
|
15982
|
-
const [selectedIndex, setSelectedIndex] =
|
|
15983
|
-
const [isFilePickerDismissed, setIsFilePickerDismissed] =
|
|
15984
|
-
const [showBridgePromo, setShowBridgePromo] =
|
|
15985
|
-
const [promoSelectedIndex, setPromoSelectedIndex] =
|
|
16093
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
16094
|
+
const [isFilePickerDismissed, setIsFilePickerDismissed] = useState15(false);
|
|
16095
|
+
const [showBridgePromo, setShowBridgePromo] = useState15(false);
|
|
16096
|
+
const [promoSelectedIndex, setPromoSelectedIndex] = useState15(0);
|
|
15986
16097
|
const suggestionOffsetRef = useRef4(0);
|
|
15987
16098
|
const persistedModelRef = useRef4(null);
|
|
15988
|
-
|
|
16099
|
+
useEffect12(() => {
|
|
15989
16100
|
const ideName = getIDEName();
|
|
15990
16101
|
const isIDE = !["Terminal", "Windows Terminal"].includes(ideName) || !!process.env.VSC_TERMINAL_URL;
|
|
15991
16102
|
const graceTimer = setTimeout(() => {
|
|
@@ -16179,7 +16290,7 @@ function App({ args = [] }) {
|
|
|
16179
16290
|
}
|
|
16180
16291
|
}
|
|
16181
16292
|
};
|
|
16182
|
-
|
|
16293
|
+
useEffect12(() => {
|
|
16183
16294
|
const handleResize = () => {
|
|
16184
16295
|
stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
16185
16296
|
setTerminalSize({
|
|
@@ -16192,18 +16303,18 @@ function App({ args = [] }) {
|
|
|
16192
16303
|
stdout.off("resize", handleResize);
|
|
16193
16304
|
};
|
|
16194
16305
|
}, [stdout]);
|
|
16195
|
-
const [thinkingLevel, setThinkingLevel] =
|
|
16196
|
-
const [aiProvider, setAiProvider] =
|
|
16197
|
-
const [setupStep, setSetupStep] =
|
|
16198
|
-
const [latestVer, setLatestVer] =
|
|
16199
|
-
const [showFullThinking, setShowFullThinking] =
|
|
16200
|
-
const [activeModel, setActiveModel] =
|
|
16201
|
-
const [janitorModel, setJanitorModel] =
|
|
16202
|
-
const [isInitializing, setIsInitializing] =
|
|
16203
|
-
const [isAppFocused, setIsAppFocused] =
|
|
16306
|
+
const [thinkingLevel, setThinkingLevel] = useState15("Medium");
|
|
16307
|
+
const [aiProvider, setAiProvider] = useState15("Google");
|
|
16308
|
+
const [setupStep, setSetupStep] = useState15(0);
|
|
16309
|
+
const [latestVer, setLatestVer] = useState15(null);
|
|
16310
|
+
const [showFullThinking, setShowFullThinking] = useState15(false);
|
|
16311
|
+
const [activeModel, setActiveModel] = useState15("gemma-4-31b-it");
|
|
16312
|
+
const [janitorModel, setJanitorModel] = useState15("gemma-4-26b-a4b-it");
|
|
16313
|
+
const [isInitializing, setIsInitializing] = useState15(true);
|
|
16314
|
+
const [isAppFocused, setIsAppFocused] = useState15(true);
|
|
16204
16315
|
const lastFocusEventTime = useRef4(0);
|
|
16205
|
-
const [apiKey, setApiKey] =
|
|
16206
|
-
const [tempKey, setTempKey] =
|
|
16316
|
+
const [apiKey, setApiKey] = useState15(null);
|
|
16317
|
+
const [tempKey, setTempKey] = useState15("");
|
|
16207
16318
|
const addShiftEnterBinding = async (ideName) => {
|
|
16208
16319
|
const kbPath = getKeybindingsPath(ideName);
|
|
16209
16320
|
if (!kbPath) return;
|
|
@@ -16254,41 +16365,41 @@ function App({ args = [] }) {
|
|
|
16254
16365
|
});
|
|
16255
16366
|
}
|
|
16256
16367
|
};
|
|
16257
|
-
const [activeView, setActiveView] =
|
|
16258
|
-
const [apiTier, setApiTier] =
|
|
16259
|
-
const [quotas, setQuotas] =
|
|
16260
|
-
const [inputConfig, setInputConfig] =
|
|
16261
|
-
const [budgetReturnView, setBudgetReturnView] =
|
|
16262
|
-
const [providerBudgetQueue, setProviderBudgetQueue] =
|
|
16263
|
-
const [providerBudgetCursor, setProviderBudgetCursor] =
|
|
16264
|
-
const [pbsCursor, setPbsCursor] =
|
|
16265
|
-
const [pbsSelected, setPbsSelected] =
|
|
16266
|
-
const [systemSettings, setSystemSettings] =
|
|
16267
|
-
const [profileData, setProfileData] =
|
|
16268
|
-
const [imageSettings, setImageSettings] =
|
|
16269
|
-
const [sessionStats, setSessionStats] =
|
|
16270
|
-
const [lastChunkTime, setLastChunkTime] =
|
|
16271
|
-
const [sessionAgentCalls, setSessionAgentCalls] =
|
|
16272
|
-
const [sessionBackgroundCalls, setSessionBackgroundCalls] =
|
|
16273
|
-
const [sessionTotalTokens, setSessionTotalTokens] =
|
|
16274
|
-
const [chatTokens, setChatTokens] =
|
|
16368
|
+
const [activeView, setActiveView] = useState15("chat");
|
|
16369
|
+
const [apiTier, setApiTier] = useState15("Free");
|
|
16370
|
+
const [quotas, setQuotas] = useState15({ limitMode: "Daily", agentLimit: 99999999, tokenLimit: 99999999999999, backgroundLimit: 999999, searchLimit: 100, customModelId: "", customLimit: 0, providerBudgets: {} });
|
|
16371
|
+
const [inputConfig, setInputConfig] = useState15(null);
|
|
16372
|
+
const [budgetReturnView, setBudgetReturnView] = useState15("chat");
|
|
16373
|
+
const [providerBudgetQueue, setProviderBudgetQueue] = useState15([]);
|
|
16374
|
+
const [providerBudgetCursor, setProviderBudgetCursor] = useState15(0);
|
|
16375
|
+
const [pbsCursor, setPbsCursor] = useState15(0);
|
|
16376
|
+
const [pbsSelected, setPbsSelected] = useState15({});
|
|
16377
|
+
const [systemSettings, setSystemSettings] = useState15({ memory: true, compression: 0, autoExec: false, autoDeleteHistory: "7d", autoUpdate: false, updateManager: "npm", customUpdateCommand: "" });
|
|
16378
|
+
const [profileData, setProfileData] = useState15({ name: null, nickname: null, instructions: null });
|
|
16379
|
+
const [imageSettings, setImageSettings] = useState15({ keyType: "Default", quality: "Low-High", apiKey: "" });
|
|
16380
|
+
const [sessionStats, setSessionStats] = useState15({ tokens: 0 });
|
|
16381
|
+
const [lastChunkTime, setLastChunkTime] = useState15(0);
|
|
16382
|
+
const [sessionAgentCalls, setSessionAgentCalls] = useState15(0);
|
|
16383
|
+
const [sessionBackgroundCalls, setSessionBackgroundCalls] = useState15(0);
|
|
16384
|
+
const [sessionTotalTokens, setSessionTotalTokens] = useState15(0);
|
|
16385
|
+
const [chatTokens, setChatTokens] = useState15(0);
|
|
16275
16386
|
const chatTokenStartRef = useRef4(0);
|
|
16276
|
-
const [sessionTotalCachedTokens, setSessionTotalCachedTokens] =
|
|
16277
|
-
const [sessionTotalCandidateTokens, setSessionTotalCandidateTokens] =
|
|
16278
|
-
const [sessionToolSuccess, setSessionToolSuccess] =
|
|
16279
|
-
const [sessionToolFailure, setSessionToolFailure] =
|
|
16280
|
-
const [sessionToolDenied, setSessionToolDenied] =
|
|
16281
|
-
const [sessionApiTime, setSessionApiTime] =
|
|
16282
|
-
const [sessionToolTime, setSessionToolTime] =
|
|
16283
|
-
const [sessionImageCount, setSessionImageCount] =
|
|
16284
|
-
const [sessionImageCredits, setSessionImageCredits] =
|
|
16285
|
-
const [dailyUsage, setDailyUsage] =
|
|
16286
|
-
const [monthlyUsage, setMonthlyUsage] =
|
|
16287
|
-
const [customPeriodUsage, setCustomPeriodUsage] =
|
|
16288
|
-
const [statsMode, setStatsMode] =
|
|
16387
|
+
const [sessionTotalCachedTokens, setSessionTotalCachedTokens] = useState15(0);
|
|
16388
|
+
const [sessionTotalCandidateTokens, setSessionTotalCandidateTokens] = useState15(0);
|
|
16389
|
+
const [sessionToolSuccess, setSessionToolSuccess] = useState15(0);
|
|
16390
|
+
const [sessionToolFailure, setSessionToolFailure] = useState15(0);
|
|
16391
|
+
const [sessionToolDenied, setSessionToolDenied] = useState15(0);
|
|
16392
|
+
const [sessionApiTime, setSessionApiTime] = useState15(0);
|
|
16393
|
+
const [sessionToolTime, setSessionToolTime] = useState15(0);
|
|
16394
|
+
const [sessionImageCount, setSessionImageCount] = useState15(0);
|
|
16395
|
+
const [sessionImageCredits, setSessionImageCredits] = useState15(0);
|
|
16396
|
+
const [dailyUsage, setDailyUsage] = useState15(null);
|
|
16397
|
+
const [monthlyUsage, setMonthlyUsage] = useState15(null);
|
|
16398
|
+
const [customPeriodUsage, setCustomPeriodUsage] = useState15(null);
|
|
16399
|
+
const [statsMode, setStatsMode] = useState15("daily");
|
|
16289
16400
|
const PLAYGROUND_CHAT_ID = "flow-playground";
|
|
16290
|
-
const [chatId, setChatId] =
|
|
16291
|
-
|
|
16401
|
+
const [chatId, setChatId] = useState15(args.includes("--playground") ? PLAYGROUND_CHAT_ID : generateChatId());
|
|
16402
|
+
useEffect12(() => {
|
|
16292
16403
|
if (chatLoadingRef.current) return;
|
|
16293
16404
|
const nextTokens = sessionTotalTokens - chatTokenStartRef.current;
|
|
16294
16405
|
setChatTokens(nextTokens);
|
|
@@ -16297,7 +16408,7 @@ function App({ args = [] }) {
|
|
|
16297
16408
|
});
|
|
16298
16409
|
}
|
|
16299
16410
|
}, [sessionTotalTokens, chatId, sessionStats.tokens]);
|
|
16300
|
-
|
|
16411
|
+
useEffect12(() => {
|
|
16301
16412
|
if (activeView === "apiTier") {
|
|
16302
16413
|
const load = async () => {
|
|
16303
16414
|
const d = await getDailyUsage();
|
|
@@ -16310,18 +16421,18 @@ function App({ args = [] }) {
|
|
|
16310
16421
|
load();
|
|
16311
16422
|
}
|
|
16312
16423
|
}, [activeView, quotas.resetDay]);
|
|
16313
|
-
const [activeCommand, setActiveCommand] =
|
|
16314
|
-
const [execOutput, setExecOutput] =
|
|
16315
|
-
const [isTerminalFocused, setIsTerminalFocused] =
|
|
16316
|
-
const [activeSubagents, setActiveSubagents] =
|
|
16317
|
-
const [tick, setTick] =
|
|
16424
|
+
const [activeCommand, setActiveCommand] = useState15(null);
|
|
16425
|
+
const [execOutput, setExecOutput] = useState15("");
|
|
16426
|
+
const [isTerminalFocused, setIsTerminalFocused] = useState15(false);
|
|
16427
|
+
const [activeSubagents, setActiveSubagents] = useState15([]);
|
|
16428
|
+
const [tick, setTick] = useState15(0);
|
|
16318
16429
|
const isFirstRender = useRef4(true);
|
|
16319
16430
|
const isSecondRender = useRef4(true);
|
|
16320
16431
|
const isThirdRender = useRef4(true);
|
|
16321
16432
|
const prevProviderRef = useRef4(aiProvider);
|
|
16322
16433
|
const originalAllowExternalAccessRef = useRef4(false);
|
|
16323
16434
|
const originalMemoryRef = useRef4(true);
|
|
16324
|
-
|
|
16435
|
+
useEffect12(() => {
|
|
16325
16436
|
if (prevProviderRef.current !== aiProvider) {
|
|
16326
16437
|
prevProviderRef.current = aiProvider;
|
|
16327
16438
|
const hasStandard = aiProvider === "DeepSeek" || aiProvider === "NVIDIA";
|
|
@@ -16334,7 +16445,7 @@ function App({ args = [] }) {
|
|
|
16334
16445
|
}
|
|
16335
16446
|
}
|
|
16336
16447
|
}, [aiProvider, activeModel, thinkingLevel]);
|
|
16337
|
-
|
|
16448
|
+
useEffect12(() => {
|
|
16338
16449
|
if (!apiKey) return;
|
|
16339
16450
|
if (isFirstRender.current) {
|
|
16340
16451
|
isFirstRender.current = false;
|
|
@@ -16408,15 +16519,15 @@ function App({ args = [] }) {
|
|
|
16408
16519
|
}, []);
|
|
16409
16520
|
const activeCommandRef = useRef4(null);
|
|
16410
16521
|
const execOutputRef = useRef4("");
|
|
16411
|
-
|
|
16522
|
+
useEffect12(() => {
|
|
16412
16523
|
activeCommandRef.current = activeCommand;
|
|
16413
16524
|
}, [activeCommand]);
|
|
16414
|
-
|
|
16525
|
+
useEffect12(() => {
|
|
16415
16526
|
execOutputRef.current = execOutput;
|
|
16416
16527
|
}, [execOutput]);
|
|
16417
|
-
const [autoAcceptWrites, setAutoAcceptWrites] =
|
|
16418
|
-
const [pendingApproval, setPendingApproval] =
|
|
16419
|
-
const [pendingAsk, setPendingAsk] =
|
|
16528
|
+
const [autoAcceptWrites, setAutoAcceptWrites] = useState15(false);
|
|
16529
|
+
const [pendingApproval, setPendingApproval] = useState15(null);
|
|
16530
|
+
const [pendingAsk, setPendingAsk] = useState15(null);
|
|
16420
16531
|
const resetPendingApproval = (decision) => {
|
|
16421
16532
|
setPendingApproval(null);
|
|
16422
16533
|
setActiveView("chat");
|
|
@@ -16435,14 +16546,14 @@ function App({ args = [] }) {
|
|
|
16435
16546
|
if (ms < 1e3) return `${ms}ms`;
|
|
16436
16547
|
return formatDuration(Math.floor(ms / 1e3));
|
|
16437
16548
|
};
|
|
16438
|
-
const [statusText, setStatusText] =
|
|
16439
|
-
const [wittyPhrase, setWittyPhrase] =
|
|
16440
|
-
const [hasPasteBlock, setHasPasteBlock] =
|
|
16441
|
-
const [activeTime, setActiveTime] =
|
|
16549
|
+
const [statusText, setStatusText] = useState15(null);
|
|
16550
|
+
const [wittyPhrase, setWittyPhrase] = useState15("");
|
|
16551
|
+
const [hasPasteBlock, setHasPasteBlock] = useState15(false);
|
|
16552
|
+
const [activeTime, setActiveTime] = useState15(0);
|
|
16442
16553
|
let interval_for_timer;
|
|
16443
|
-
|
|
16554
|
+
useEffect12(() => {
|
|
16444
16555
|
let interval;
|
|
16445
|
-
if (statusText) {
|
|
16556
|
+
if (statusText && systemSettings.loadingPhrases !== false) {
|
|
16446
16557
|
const updatePhrase = () => {
|
|
16447
16558
|
const randomPhrase = WITTY_LOADING_PHRASES[Math.floor(Math.random() * WITTY_LOADING_PHRASES.length)];
|
|
16448
16559
|
setWittyPhrase(randomPhrase);
|
|
@@ -16455,17 +16566,17 @@ function App({ args = [] }) {
|
|
|
16455
16566
|
return () => {
|
|
16456
16567
|
clearInterval(interval);
|
|
16457
16568
|
};
|
|
16458
|
-
}, [statusText]);
|
|
16459
|
-
const [isSpinnerActive, setIsSpinnerActive] =
|
|
16460
|
-
const [isProcessing, setIsProcessing] =
|
|
16461
|
-
const [isCompressing, setIsCompressing] =
|
|
16462
|
-
const [escPressed, setEscPressed] =
|
|
16463
|
-
const [escTimer, setEscTimer] =
|
|
16464
|
-
const [escPressCount, setEscPressCount] =
|
|
16465
|
-
const [recentPrompts, setRecentPrompts] =
|
|
16569
|
+
}, [statusText, systemSettings]);
|
|
16570
|
+
const [isSpinnerActive, setIsSpinnerActive] = useState15(true);
|
|
16571
|
+
const [isProcessing, setIsProcessing] = useState15(false);
|
|
16572
|
+
const [isCompressing, setIsCompressing] = useState15(false);
|
|
16573
|
+
const [escPressed, setEscPressed] = useState15(false);
|
|
16574
|
+
const [escTimer, setEscTimer] = useState15(null);
|
|
16575
|
+
const [escPressCount, setEscPressCount] = useState15(0);
|
|
16576
|
+
const [recentPrompts, setRecentPrompts] = useState15([]);
|
|
16466
16577
|
const escDoubleTimerRef = useRef4(null);
|
|
16467
16578
|
const chatLoadingRef = useRef4(false);
|
|
16468
|
-
|
|
16579
|
+
useEffect12(() => {
|
|
16469
16580
|
return () => {
|
|
16470
16581
|
if (escDoubleTimerRef.current) {
|
|
16471
16582
|
clearTimeout(escDoubleTimerRef.current);
|
|
@@ -16473,11 +16584,11 @@ function App({ args = [] }) {
|
|
|
16473
16584
|
};
|
|
16474
16585
|
}, []);
|
|
16475
16586
|
const didSignalTerminationRef = useRef4(false);
|
|
16476
|
-
const [queuedPrompt, setQueuedPrompt] =
|
|
16477
|
-
const [resolutionData, setResolutionData] =
|
|
16478
|
-
const [tempModelOverride, setTempModelOverride] =
|
|
16479
|
-
|
|
16480
|
-
const [messages, rawSetMessages] =
|
|
16587
|
+
const [queuedPrompt, setQueuedPrompt] = useState15(null);
|
|
16588
|
+
const [resolutionData, setResolutionData] = useState15(null);
|
|
16589
|
+
const [tempModelOverride, setTempModelOverride] = useState15(null);
|
|
16590
|
+
useEffect12(() => setEscPressCount(0), [input]);
|
|
16591
|
+
const [messages, rawSetMessages] = useState15(() => {
|
|
16481
16592
|
const logoMsg = { id: "logo-" + Date.now(), role: "system", isLogo: true, isMeta: true };
|
|
16482
16593
|
const isHomeDir = process.cwd() === os5.homedir();
|
|
16483
16594
|
const isSystemDir = (() => {
|
|
@@ -16526,11 +16637,11 @@ function App({ args = [] }) {
|
|
|
16526
16637
|
});
|
|
16527
16638
|
};
|
|
16528
16639
|
const queuedPromptRef = useRef4(null);
|
|
16529
|
-
const [btwResponse, setBtwResponse] =
|
|
16530
|
-
const [showBtwBox, setShowBtwBox] =
|
|
16640
|
+
const [btwResponse, setBtwResponse] = useState15("");
|
|
16641
|
+
const [showBtwBox, setShowBtwBox] = useState15(false);
|
|
16531
16642
|
const btwResponseRef = useRef4("");
|
|
16532
16643
|
const btwClosedRef = useRef4(null);
|
|
16533
|
-
|
|
16644
|
+
useEffect12(() => {
|
|
16534
16645
|
if (messages.length === 0) return;
|
|
16535
16646
|
const lastMsg = messages[messages.length - 1];
|
|
16536
16647
|
if (lastMsg && (lastMsg.role === "agent" || lastMsg.role === "assistant")) {
|
|
@@ -16548,8 +16659,8 @@ function App({ args = [] }) {
|
|
|
16548
16659
|
}
|
|
16549
16660
|
}
|
|
16550
16661
|
}, [messages]);
|
|
16551
|
-
const [completedIndex, setCompletedIndex] =
|
|
16552
|
-
const [clearKey, setClearKey] =
|
|
16662
|
+
const [completedIndex, setCompletedIndex] = useState15(messages.length);
|
|
16663
|
+
const [clearKey, setClearKey] = useState15(0);
|
|
16553
16664
|
const lastCompletedBlocksRef = useRef4([]);
|
|
16554
16665
|
const cachedHistoryRef = useRef4({
|
|
16555
16666
|
completedIndex: 0,
|
|
@@ -16886,7 +16997,7 @@ function App({ args = [] }) {
|
|
|
16886
16997
|
setInput((prev) => prev.replace(/\\\r?$/, "").replace(/\r?$/, "") + "\n");
|
|
16887
16998
|
}
|
|
16888
16999
|
});
|
|
16889
|
-
|
|
17000
|
+
useEffect12(() => {
|
|
16890
17001
|
process.stdout.write("\x1B[?1004h");
|
|
16891
17002
|
const onData = (data) => {
|
|
16892
17003
|
const str = data.toString();
|
|
@@ -16904,7 +17015,7 @@ function App({ args = [] }) {
|
|
|
16904
17015
|
process.stdin.off("data", onData);
|
|
16905
17016
|
};
|
|
16906
17017
|
}, []);
|
|
16907
|
-
|
|
17018
|
+
useEffect12(() => {
|
|
16908
17019
|
async function init() {
|
|
16909
17020
|
try {
|
|
16910
17021
|
const pkg = JSON.parse(fs24.readFileSync(path22.join(process.cwd(), "package.json"), "utf8"));
|
|
@@ -17126,7 +17237,7 @@ function App({ args = [] }) {
|
|
|
17126
17237
|
}
|
|
17127
17238
|
init();
|
|
17128
17239
|
}, []);
|
|
17129
|
-
|
|
17240
|
+
useEffect12(() => {
|
|
17130
17241
|
let timer;
|
|
17131
17242
|
if (confirmExit) {
|
|
17132
17243
|
setExitCountdown(10);
|
|
@@ -17144,7 +17255,7 @@ function App({ args = [] }) {
|
|
|
17144
17255
|
if (timer) clearInterval(timer);
|
|
17145
17256
|
};
|
|
17146
17257
|
}, [confirmExit]);
|
|
17147
|
-
|
|
17258
|
+
useEffect12(() => {
|
|
17148
17259
|
if (!isInitializing) {
|
|
17149
17260
|
const modelToSave = parsedArgs.model && activeModel === parsedArgs.model ? persistedModelRef.current : activeModel;
|
|
17150
17261
|
let settingsToSave = systemSettings;
|
|
@@ -17194,7 +17305,7 @@ function App({ args = [] }) {
|
|
|
17194
17305
|
}
|
|
17195
17306
|
};
|
|
17196
17307
|
const lastSavedTimeRef = useRef4(SESSION_START_TIME);
|
|
17197
|
-
|
|
17308
|
+
useEffect12(() => {
|
|
17198
17309
|
if (activeView === "exit") {
|
|
17199
17310
|
const flush = async () => {
|
|
17200
17311
|
const now = Date.now();
|
|
@@ -17212,7 +17323,7 @@ function App({ args = [] }) {
|
|
|
17212
17323
|
return () => clearTimeout(timer);
|
|
17213
17324
|
}
|
|
17214
17325
|
}, [activeView]);
|
|
17215
|
-
|
|
17326
|
+
useEffect12(() => {
|
|
17216
17327
|
const interval = setInterval(async () => {
|
|
17217
17328
|
if (!isInitializing) {
|
|
17218
17329
|
const now = Date.now();
|
|
@@ -18559,6 +18670,7 @@ ${timestamp}` };
|
|
|
18559
18670
|
id: "ask-" + Date.now(),
|
|
18560
18671
|
role: "system",
|
|
18561
18672
|
text: `\u{1F4AC} **Ask User**
|
|
18673
|
+
Question: ${question}
|
|
18562
18674
|
Selection: ${val}`,
|
|
18563
18675
|
isAskRecord: true
|
|
18564
18676
|
}
|
|
@@ -18638,7 +18750,9 @@ Selection: ${val}`,
|
|
|
18638
18750
|
isFirstPacket = false;
|
|
18639
18751
|
}
|
|
18640
18752
|
if (packet.type === "status") {
|
|
18641
|
-
|
|
18753
|
+
if (!packet.content?.includes("[start]")) {
|
|
18754
|
+
setStatusText(packet.content);
|
|
18755
|
+
}
|
|
18642
18756
|
if (packet.content?.includes("[start]")) {
|
|
18643
18757
|
clearInterval(interval_for_timer);
|
|
18644
18758
|
setActiveTime(0);
|
|
@@ -19089,10 +19203,34 @@ Selection: ${val}`,
|
|
|
19089
19203
|
}
|
|
19090
19204
|
return [];
|
|
19091
19205
|
}, [input, isFilePickerDismissed]);
|
|
19092
|
-
|
|
19206
|
+
useEffect12(() => {
|
|
19093
19207
|
setSelectedIndex(0);
|
|
19094
19208
|
}, [suggestions]);
|
|
19095
|
-
|
|
19209
|
+
const [suggestionVisibleCount, setSuggestionVisibleCount] = useState15(0);
|
|
19210
|
+
const prevSuggestionsLenRef = useRef4(0);
|
|
19211
|
+
useEffect12(() => {
|
|
19212
|
+
const wasOpen = prevSuggestionsLenRef.current > 0;
|
|
19213
|
+
const isOpen = suggestions.length > 0;
|
|
19214
|
+
prevSuggestionsLenRef.current = suggestions.length;
|
|
19215
|
+
if (!isOpen) {
|
|
19216
|
+
setSuggestionVisibleCount(0);
|
|
19217
|
+
return;
|
|
19218
|
+
}
|
|
19219
|
+
if (!wasOpen) {
|
|
19220
|
+
setSuggestionVisibleCount(1);
|
|
19221
|
+
return;
|
|
19222
|
+
}
|
|
19223
|
+
setSuggestionVisibleCount(suggestions.length);
|
|
19224
|
+
}, [suggestions]);
|
|
19225
|
+
useEffect12(() => {
|
|
19226
|
+
if (suggestionVisibleCount > 0 && suggestionVisibleCount < suggestions.length) {
|
|
19227
|
+
const t = setTimeout(() => {
|
|
19228
|
+
setSuggestionVisibleCount((prev) => Math.min(prev + 1, suggestions.length));
|
|
19229
|
+
}, 5);
|
|
19230
|
+
return () => clearTimeout(t);
|
|
19231
|
+
}
|
|
19232
|
+
}, [suggestionVisibleCount, suggestions.length]);
|
|
19233
|
+
useEffect12(() => {
|
|
19096
19234
|
if (activeView !== "providerBudgetSelect") return;
|
|
19097
19235
|
const PBS_PROVIDERS = ["Google", "DeepSeek", "NVIDIA", "OpenRouter"];
|
|
19098
19236
|
const existingBudgets = quotas.providerBudgets || {};
|
|
@@ -19103,7 +19241,7 @@ Selection: ${val}`,
|
|
|
19103
19241
|
setPbsSelected(initialSelected);
|
|
19104
19242
|
setPbsCursor(0);
|
|
19105
19243
|
}, [activeView]);
|
|
19106
|
-
|
|
19244
|
+
useEffect12(() => {
|
|
19107
19245
|
if (activeView !== "providerBudgetFlow") return;
|
|
19108
19246
|
const currentProvider = providerBudgetQueue[providerBudgetCursor];
|
|
19109
19247
|
if (!currentProvider) {
|
|
@@ -19175,7 +19313,7 @@ Selection: ${val}`,
|
|
|
19175
19313
|
}, [activeView, providerBudgetCursor]);
|
|
19176
19314
|
const CustomMenuItem = ({ label, isSelected }) => {
|
|
19177
19315
|
const isCancel = label === "Cancel" || label === "Back" || label.toLowerCase().includes("exit") || label.toLowerCase().includes("back");
|
|
19178
|
-
return /* @__PURE__ */
|
|
19316
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19179
19317
|
Box14,
|
|
19180
19318
|
{
|
|
19181
19319
|
marginTop: isCancel ? 1 : 0,
|
|
@@ -19183,7 +19321,7 @@ Selection: ${val}`,
|
|
|
19183
19321
|
paddingX: 1,
|
|
19184
19322
|
width: "100%"
|
|
19185
19323
|
},
|
|
19186
|
-
/* @__PURE__ */
|
|
19324
|
+
/* @__PURE__ */ React16.createElement(Text16, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label)
|
|
19187
19325
|
);
|
|
19188
19326
|
};
|
|
19189
19327
|
const renderProgressBar = (label, current, limit) => {
|
|
@@ -19200,12 +19338,12 @@ Selection: ${val}`,
|
|
|
19200
19338
|
const isTokens = label.toLowerCase().includes("token");
|
|
19201
19339
|
const displayLimit = shouldClearValue(limit) ? "\u221E" : isTokens ? formatTokens(limit) : limit;
|
|
19202
19340
|
const displayCurrent = isTokens ? formatTokens(current) : current;
|
|
19203
|
-
return /* @__PURE__ */
|
|
19341
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "row", paddingLeft: 4, key: label }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, label, ": ")), /* @__PURE__ */ React16.createElement(Text16, { color: barColor }, barStr), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " ", percent, "% (", displayCurrent, "/", displayLimit, ")"));
|
|
19204
19342
|
};
|
|
19205
19343
|
const renderActiveView = () => {
|
|
19206
19344
|
switch (activeView) {
|
|
19207
19345
|
case "settings":
|
|
19208
|
-
return /* @__PURE__ */
|
|
19346
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19209
19347
|
SettingsMenu,
|
|
19210
19348
|
{
|
|
19211
19349
|
systemSettings,
|
|
@@ -19220,7 +19358,7 @@ Selection: ${val}`,
|
|
|
19220
19358
|
}
|
|
19221
19359
|
);
|
|
19222
19360
|
case "selectProvider":
|
|
19223
|
-
return /* @__PURE__ */
|
|
19361
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19224
19362
|
CommandMenu,
|
|
19225
19363
|
{
|
|
19226
19364
|
title: "SELECT AI PROVIDER",
|
|
@@ -19278,7 +19416,7 @@ Selection: ${val}`,
|
|
|
19278
19416
|
}
|
|
19279
19417
|
);
|
|
19280
19418
|
case "apiTier": {
|
|
19281
|
-
return /* @__PURE__ */
|
|
19419
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "SELECT API MODE FOR ", aiProvider.toUpperCase())), /* @__PURE__ */ React16.createElement(
|
|
19282
19420
|
SelectInput2,
|
|
19283
19421
|
{
|
|
19284
19422
|
items: [
|
|
@@ -19308,10 +19446,10 @@ Selection: ${val}`,
|
|
|
19308
19446
|
itemComponent: CustomMenuItem,
|
|
19309
19447
|
indicatorComponent: () => null
|
|
19310
19448
|
}
|
|
19311
|
-
), /* @__PURE__ */
|
|
19449
|
+
), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Arrows to select \u2022 Enter to confirm)")));
|
|
19312
19450
|
}
|
|
19313
19451
|
case "resetMode":
|
|
19314
|
-
return /* @__PURE__ */
|
|
19452
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19315
19453
|
CommandMenu,
|
|
19316
19454
|
{
|
|
19317
19455
|
title: "SELECT MONTHLY RESET MODE",
|
|
@@ -19346,7 +19484,7 @@ Selection: ${val}`,
|
|
|
19346
19484
|
}
|
|
19347
19485
|
);
|
|
19348
19486
|
case "budgetTypeSelect":
|
|
19349
|
-
return /* @__PURE__ */
|
|
19487
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19350
19488
|
CommandMenu,
|
|
19351
19489
|
{
|
|
19352
19490
|
title: "SELECT BUDGET TYPE",
|
|
@@ -19413,16 +19551,16 @@ Selection: ${val}`,
|
|
|
19413
19551
|
case "providerBudgetSelect": {
|
|
19414
19552
|
const PROVIDERS_LIST = ["Google", "DeepSeek", "NVIDIA", "OpenRouter"];
|
|
19415
19553
|
const anySelected = PROVIDERS_LIST.some((p) => pbsSelected[p]);
|
|
19416
|
-
return /* @__PURE__ */
|
|
19554
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", bold: true }, "SELECT PROVIDERS TO SET BUDGETS FOR")), PROVIDERS_LIST.map((prov, i) => {
|
|
19417
19555
|
const isActive = i === pbsCursor;
|
|
19418
19556
|
const isChecked = !!pbsSelected[prov];
|
|
19419
|
-
return /* @__PURE__ */
|
|
19420
|
-
}), /* @__PURE__ */
|
|
19557
|
+
return /* @__PURE__ */ React16.createElement(Box14, { key: prov, backgroundColor: isActive ? "#2a2a2a" : void 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: isActive ? "white" : "gray", bold: isActive }, isActive ? "\u276F " : " ", /* @__PURE__ */ React16.createElement(Text16, { color: isChecked ? "green" : "gray" }, isChecked ? "\u2611" : "\u2610"), " ", prov, isChecked && quotas.providerBudgets?.[prov]?.agentLimit ? /* @__PURE__ */ React16.createElement(Text16, { color: "cyan" }, " (budget set)") : null));
|
|
19558
|
+
}), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "\u2191\u2193 Navigate \u2022 Space to toggle \u2022 Enter to confirm \u2022 ESC to go back"), !anySelected && /* @__PURE__ */ React16.createElement(Text16, { color: "yellow", italic: true }, " Select at least one provider to continue")));
|
|
19421
19559
|
}
|
|
19422
19560
|
case "providerBudgetFlow":
|
|
19423
19561
|
return null;
|
|
19424
19562
|
case "budgetResetMode":
|
|
19425
|
-
return /* @__PURE__ */
|
|
19563
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19426
19564
|
CommandMenu,
|
|
19427
19565
|
{
|
|
19428
19566
|
title: "SELECT MONTHLY RESET MODE",
|
|
@@ -19482,7 +19620,7 @@ Selection: ${val}`,
|
|
|
19482
19620
|
const monthName = resetDate.toLocaleString("default", { month: "short" });
|
|
19483
19621
|
resetInfo = `Resets on: ${resetDay}-${monthName}`;
|
|
19484
19622
|
}
|
|
19485
|
-
return /* @__PURE__ */
|
|
19623
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "BUDGET LIMIT STATUS"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "[ ESC to Close ]")), limitsNotSet ? /* @__PURE__ */ React16.createElement(Box14, { padding: 1, justifyContent: "center", alignItems: "center", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "LIMITS NOT SET")) : usingProviderBudgets && configuredProviders.length > 0 ? /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", gap: 1, width: "100%" }, configuredProviders.map((prov) => {
|
|
19486
19624
|
const pb = providerBudgetsMap[prov];
|
|
19487
19625
|
const provReqCurrent = dailyUsage?.providerRequests?.[prov] || 0;
|
|
19488
19626
|
let provTokenCurrent = 0;
|
|
@@ -19496,11 +19634,11 @@ Selection: ${val}`,
|
|
|
19496
19634
|
for (const m in monthlyModels) {
|
|
19497
19635
|
provMonthlyCurrent += monthlyModels[m]?.tokens || 0;
|
|
19498
19636
|
}
|
|
19499
|
-
return /* @__PURE__ */
|
|
19500
|
-
}), resetInfo ? /* @__PURE__ */
|
|
19637
|
+
return /* @__PURE__ */ React16.createElement(Box14, { key: prov, flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 0 }, /* @__PURE__ */ React16.createElement(Text16, { color: "cyan", bold: true }, "\u25C6 ", prov)), renderProgressBar("Daily Requests", provReqCurrent, pb.agentLimit || 99999999, "cyan"), renderProgressBar("Daily Tokens", provTokenCurrent, pb.tokenLimit || 99999999999999, "green"), renderProgressBar("Monthly Tokens", provMonthlyCurrent, pb.monthlyTokenLimit || 99999999999999, "yellow"));
|
|
19638
|
+
}), resetInfo ? /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React16.createElement(Text16, { color: "magenta", bold: true }, resetInfo)) : /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React16.createElement(Text16, { color: "blue", bold: true }, "Rolling 30-Day Window"))) : /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, width: "100%" }, renderProgressBar("Daily Requests", reqCurrent, reqLimit, "cyan"), renderProgressBar("Daily Tokens", tokenCurrent, tokenLimit, "green"), renderProgressBar("Monthly Tokens", monthlyCurrent, monthlyLimit, "yellow"), resetInfo ? /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React16.createElement(Text16, { color: "magenta", bold: true }, resetInfo)) : /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React16.createElement(Text16, { color: "blue", bold: true }, "Rolling 30-Day Window"))));
|
|
19501
19639
|
}
|
|
19502
19640
|
case "input":
|
|
19503
|
-
return /* @__PURE__ */
|
|
19641
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "DATA CONFIGURATION")), inputConfig?.note && /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, inputConfig.note)), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, flexDirection: "row" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, inputConfig?.label, " "), /* @__PURE__ */ React16.createElement(
|
|
19504
19642
|
TextInput4,
|
|
19505
19643
|
{
|
|
19506
19644
|
value: inputConfig?.value || "",
|
|
@@ -19603,7 +19741,7 @@ Selection: ${val}`,
|
|
|
19603
19741
|
}
|
|
19604
19742
|
}
|
|
19605
19743
|
}
|
|
19606
|
-
)), /* @__PURE__ */
|
|
19744
|
+
)), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, "(Press Enter to confirm selection)")));
|
|
19607
19745
|
case "stats": {
|
|
19608
19746
|
const u = statsMode === "monthly" ? monthlyUsage : dailyUsage;
|
|
19609
19747
|
const trackerTitle = statsMode === "monthly" ? "LAST 30 DAYS USAGE" : "TODAY's USAGE";
|
|
@@ -19613,13 +19751,13 @@ Selection: ${val}`,
|
|
|
19613
19751
|
const imageCreditsLabel = statsMode === "monthly" ? "Image Credits:" : "Image Credits:";
|
|
19614
19752
|
const codeChangesLabel = statsMode === "monthly" ? "Code Changes:" : "Code Changes:";
|
|
19615
19753
|
const toolCallsLabel = statsMode === "monthly" ? "Tool Calls:" : "Tool Calls:";
|
|
19616
|
-
return /* @__PURE__ */
|
|
19754
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 3, paddingY: 1, paddingBottom: 0, width: Math.min(125, (stdout?.columns || 100) - 2) }, statsMode === "modelBreakdown" ? /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "30-DAY MODEL TOKEN BREAKDOWN"), !monthlyUsage?.models || Object.keys(monthlyUsage.models).length === 0 ? /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey", italic: true }, "No model token usage recorded in the last 30 days.")) : Object.entries(monthlyUsage.models).map(([provider, models]) => {
|
|
19617
19755
|
const providerTotalTokens = Object.values(models).reduce((sum, m) => sum + (m.tokens || 0), 0);
|
|
19618
|
-
return /* @__PURE__ */
|
|
19619
|
-
})) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 21 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", runtimeSession.linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", runtimeSession.linesRemoved))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, runtimeSession.toolSuccess + runtimeSession.toolFailure + runtimeSession.toolDenied, " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2714 ", runtimeSession.toolSuccess), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u{1F6C7} ", runtimeSession.toolDenied), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2718 ", runtimeSession.toolFailure), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " )"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, timeLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 21 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2714 ", u?.toolSuccess || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u{1F6C7} ", u?.toolDenied || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2718 ", u?.toolFailure || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " )")))), /* @__PURE__ */ React15.createElement(Text15, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
|
|
19756
|
+
return /* @__PURE__ */ React16.createElement(Box14, { key: provider, flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 40 }, /* @__PURE__ */ React16.createElement(Text16, { color: "cyan", bold: true }, provider, ":")), /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, formatTokens(providerTotalTokens))), Object.entries(models).map(([modelName, stats]) => /* @__PURE__ */ React16.createElement(Box14, { key: modelName, flexDirection: "column", marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 36 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "\xBB ", modelName, ":")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(stats.tokens || 0))), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 32 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens((stats.tokens || 0) - (stats.candidateTokens || 0)))), (stats.cachedTokens || 0) > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 5 }, /* @__PURE__ */ React16.createElement(Box14, { width: 31 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(stats.cachedTokens))), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 32 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(stats.candidateTokens || 0))))));
|
|
19757
|
+
})) : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 23 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 23 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 23 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 21 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 23 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "+", runtimeSession.linesAdded), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "-", runtimeSession.linesRemoved))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, runtimeSession.toolSuccess + runtimeSession.toolFailure + runtimeSession.toolDenied, " ( "), /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "\u2714 ", runtimeSession.toolSuccess), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React16.createElement(Text16, { color: "yellow" }, "\u{1F6C7} ", runtimeSession.toolDenied), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "\u2718 ", runtimeSession.toolFailure), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " )"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, timeLabel)), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 23 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 21 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 23 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 25 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "\u2714 ", u?.toolSuccess || 0), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React16.createElement(Text16, { color: "yellow" }, "\u{1F6C7} ", u?.toolDenied || 0), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "\u2718 ", u?.toolFailure || 0), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " )")))), /* @__PURE__ */ React16.createElement(Text16, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
|
|
19620
19758
|
}
|
|
19621
19759
|
case "autoExecDanger":
|
|
19622
|
-
return /* @__PURE__ */
|
|
19760
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "SECURITY WARNING: YOLO MODE"), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "Turning this ON allows the agent to execute terminal commands automatically without requiring your approval for each step."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1, color: "white" }, "RISKS INVOLVED:"), /* @__PURE__ */ React16.createElement(Text16, null, "\u2022 The agent may execute destructive commands (rm -rf, etc.) by mistake unless specified in sandbox rules."), /* @__PURE__ */ React16.createElement(Text16, null, "\u2022 Unintended system changes if the agent hallucinates a path or command."), /* @__PURE__ */ React16.createElement(Text16, null, "\u2022 Reduced control over the agent's step-by-step decision making."), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19623
19761
|
CommandMenu,
|
|
19624
19762
|
{
|
|
19625
19763
|
title: "Confirm Intent",
|
|
@@ -19636,7 +19774,7 @@ Selection: ${val}`,
|
|
|
19636
19774
|
}
|
|
19637
19775
|
)));
|
|
19638
19776
|
case "advanceRollbackDanger":
|
|
19639
|
-
return /* @__PURE__ */
|
|
19777
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, paddingTop: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "\u26A0 Emergency Rollback Notice"), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "When enabled, full repo snapshots exist only during active AI turns."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "If catastrophic changes occur during a turn, avoid abruptly stopping the agent unless absolutely necessary (external damages out of codebase)."), /* @__PURE__ */ React16.createElement(Text16, null, "The agent may be able to automatically restore the repo to a safe state."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "Once the turn ends, emergency snapshots are deleted and standard /revert takes over which may not retain full repo content."), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19640
19778
|
CommandMenu,
|
|
19641
19779
|
{
|
|
19642
19780
|
title: "Confirm",
|
|
@@ -19653,7 +19791,7 @@ Selection: ${val}`,
|
|
|
19653
19791
|
}
|
|
19654
19792
|
)));
|
|
19655
19793
|
case "externalDanger":
|
|
19656
|
-
return /* @__PURE__ */
|
|
19794
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "SECURITY WARNING: EXTERNAL WORKSPACE ACCESS"), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "Turning this ON allows the agent to execute tools (Read/Write/Exec) outside of the current active workspace directory."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1, color: "white" }, "RISKS INVOLVED:"), /* @__PURE__ */ React16.createElement(Text16, null, "\u2022 Access to sensitive system files (SSH keys, Browser data, etc.)"), /* @__PURE__ */ React16.createElement(Text16, null, "\u2022 Potential for accidental or malicious deletion of OS-critical files."), /* @__PURE__ */ React16.createElement(Text16, null, "\u2022 Unauthorized script execution across your entire file system."), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19657
19795
|
CommandMenu,
|
|
19658
19796
|
{
|
|
19659
19797
|
title: "Confirm Intent",
|
|
@@ -19670,7 +19808,7 @@ Selection: ${val}`,
|
|
|
19670
19808
|
}
|
|
19671
19809
|
)));
|
|
19672
19810
|
case "doubleDanger":
|
|
19673
|
-
return /* @__PURE__ */
|
|
19811
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "CRITICAL SECURITY WARNING: COMBINED SYSTEM RISK"), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "You are attempting to enable BOTH [YOLO Mode] and [External Workspace Access] simultaneously."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1, color: "red", bold: true }, "THIS IS NOT RECOMMENDED."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1, color: "white" }, "THE CRITICAL RISK:"), /* @__PURE__ */ React16.createElement(Text16, null, "The agent will have the power to execute any command across your entire system WITHOUT your approval or supervision."), /* @__PURE__ */ React16.createElement(Text16, { color: "red", italic: true, marginTop: 1 }, "A single hallucination or error could result in full system wipe or data theft."), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19674
19812
|
CommandMenu,
|
|
19675
19813
|
{
|
|
19676
19814
|
title: "Final Confirmation",
|
|
@@ -19687,7 +19825,7 @@ Selection: ${val}`,
|
|
|
19687
19825
|
}
|
|
19688
19826
|
)));
|
|
19689
19827
|
case "key":
|
|
19690
|
-
return /* @__PURE__ */
|
|
19828
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19691
19829
|
CommandMenu,
|
|
19692
19830
|
{
|
|
19693
19831
|
title: "API KEY MANAGEMENT",
|
|
@@ -19711,10 +19849,10 @@ Selection: ${val}`,
|
|
|
19711
19849
|
}
|
|
19712
19850
|
);
|
|
19713
19851
|
case "deleteKey":
|
|
19714
|
-
return /* @__PURE__ */
|
|
19852
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1 }, (() => {
|
|
19715
19853
|
const s = emojiSpace(2);
|
|
19716
|
-
return /* @__PURE__ */
|
|
19717
|
-
})(), /* @__PURE__ */
|
|
19854
|
+
return /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "DANGER: CLEAR CREDENTIALS");
|
|
19855
|
+
})(), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "This will permanently delete all saved API keys in credential cache. You will need to enter it again to use Flux."), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19718
19856
|
CommandMenu,
|
|
19719
19857
|
{
|
|
19720
19858
|
title: "Are you sure?",
|
|
@@ -19738,7 +19876,7 @@ Selection: ${val}`,
|
|
|
19738
19876
|
case "exit":
|
|
19739
19877
|
return null;
|
|
19740
19878
|
case "ask":
|
|
19741
|
-
return /* @__PURE__ */
|
|
19879
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%" }, /* @__PURE__ */ React16.createElement(
|
|
19742
19880
|
AskUserModal_default,
|
|
19743
19881
|
{
|
|
19744
19882
|
question: pendingAsk?.question,
|
|
@@ -19753,7 +19891,7 @@ Selection: ${val}`,
|
|
|
19753
19891
|
}
|
|
19754
19892
|
));
|
|
19755
19893
|
case "revert":
|
|
19756
|
-
return /* @__PURE__ */
|
|
19894
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(
|
|
19757
19895
|
RevertModal,
|
|
19758
19896
|
{
|
|
19759
19897
|
prompts: recentPrompts,
|
|
@@ -19824,7 +19962,7 @@ Selection: ${val}`,
|
|
|
19824
19962
|
}
|
|
19825
19963
|
));
|
|
19826
19964
|
case "resume":
|
|
19827
|
-
return /* @__PURE__ */
|
|
19965
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(
|
|
19828
19966
|
ResumeModal,
|
|
19829
19967
|
{
|
|
19830
19968
|
onSelect: async (id) => {
|
|
@@ -19861,7 +19999,7 @@ Selection: ${val}`,
|
|
|
19861
19999
|
}
|
|
19862
20000
|
));
|
|
19863
20001
|
case "keybindingsPrompt":
|
|
19864
|
-
return /* @__PURE__ */
|
|
20002
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "\u2328 CONFIGURE SHIFT+ENTER NEWLINE"), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "To support multi-line inputs with ", /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "white" }, "Shift + Enter"), " for newline, a terminal sequence keybinding needs to be added to your IDE configuration."), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "Would you like FluxFlow to automatically add this to your ", getIDEName(), " keybindings?"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19865
20003
|
CommandMenu,
|
|
19866
20004
|
{
|
|
19867
20005
|
title: "Add Keybinding?",
|
|
@@ -19880,11 +20018,11 @@ Selection: ${val}`,
|
|
|
19880
20018
|
}
|
|
19881
20019
|
)));
|
|
19882
20020
|
case "memory":
|
|
19883
|
-
return /* @__PURE__ */
|
|
20021
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(MemoryModal, { onClose: () => setActiveView("chat") }));
|
|
19884
20022
|
case "parserDownload":
|
|
19885
|
-
return /* @__PURE__ */
|
|
20023
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(ParserDownloadModal, { onClose: () => setActiveView("settings") }));
|
|
19886
20024
|
case "profile":
|
|
19887
|
-
return /* @__PURE__ */
|
|
20025
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19888
20026
|
ProfileForm,
|
|
19889
20027
|
{
|
|
19890
20028
|
initialData: profileData,
|
|
@@ -19897,7 +20035,7 @@ Selection: ${val}`,
|
|
|
19897
20035
|
}
|
|
19898
20036
|
);
|
|
19899
20037
|
case "resolution":
|
|
19900
|
-
return /* @__PURE__ */
|
|
20038
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(
|
|
19901
20039
|
ResolutionModal,
|
|
19902
20040
|
{
|
|
19903
20041
|
data: resolutionData,
|
|
@@ -19916,7 +20054,7 @@ Selection: ${val}`,
|
|
|
19916
20054
|
}
|
|
19917
20055
|
));
|
|
19918
20056
|
case "approval":
|
|
19919
|
-
return /* @__PURE__ */
|
|
20057
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "FILE WRITE PERMISSION"), /* @__PURE__ */ React16.createElement(Text16, { marginTop: 1 }, "The agent is attempting to modify: ", /* @__PURE__ */ React16.createElement(Text16, { color: "cyan" }, parseArgs(pendingApproval?.args || "{}").path || "Unknown File")), !isBridgeConnected() ? /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, borderStyle: "single", borderColor: "#333", paddingX: 1, flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "--- PROPOSED CONTENT ---"), (() => {
|
|
19920
20058
|
const args2 = parseArgs(pendingApproval?.args || "{}");
|
|
19921
20059
|
const patchPairs = [];
|
|
19922
20060
|
const indices = /* @__PURE__ */ new Set();
|
|
@@ -19942,15 +20080,15 @@ Selection: ${val}`,
|
|
|
19942
20080
|
}
|
|
19943
20081
|
});
|
|
19944
20082
|
if (patchPairs.length > 0) {
|
|
19945
|
-
return /* @__PURE__ */
|
|
20083
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, patchPairs.map((pair, idx) => {
|
|
19946
20084
|
const hasOld = pair.replace !== null;
|
|
19947
20085
|
const hasNew = pair.new !== null;
|
|
19948
|
-
return /* @__PURE__ */
|
|
20086
|
+
return /* @__PURE__ */ React16.createElement(Box14, { key: idx, flexDirection: "column", marginTop: idx > 0 ? 1 : 0 }, patchPairs.length > 1 && /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "Block ", idx + 1, ":"), hasOld && /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Text16, { color: "red", wrap: "anywhere", bold: true }, "- ", pair.replace)), hasNew && /* @__PURE__ */ React16.createElement(Box14, { marginTop: hasOld ? 0 : 0 }, /* @__PURE__ */ React16.createElement(Text16, { color: "green", wrap: "anywhere", bold: true }, "+ ", pair.new.replace(/\[\/n\]?/g, "\\n"))));
|
|
19949
20087
|
}));
|
|
19950
20088
|
}
|
|
19951
20089
|
const newVal = args2.content || args2.ReplacementContent || args2.content_to_add || args2.replacementContent || args2.newContent || null;
|
|
19952
|
-
return /* @__PURE__ */
|
|
19953
|
-
})()) : /* @__PURE__ */
|
|
20090
|
+
return /* @__PURE__ */ React16.createElement(Text16, { color: "white", wrap: "anywhere" }, (newVal ? newVal.replace(/\[\/n\]?/g, "\\n") : null) || "Updating file content...");
|
|
20091
|
+
})()) : /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "cyan", italic: true }, "\u26A1\uFE0F FluxFlow Companion is active. Review the changes in your editor.")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
19954
20092
|
CommandMenu,
|
|
19955
20093
|
{
|
|
19956
20094
|
title: "Action Required",
|
|
@@ -19969,7 +20107,7 @@ Selection: ${val}`,
|
|
|
19969
20107
|
}
|
|
19970
20108
|
)));
|
|
19971
20109
|
case "updateManager":
|
|
19972
|
-
return /* @__PURE__ */
|
|
20110
|
+
return /* @__PURE__ */ React16.createElement(
|
|
19973
20111
|
CommandMenu,
|
|
19974
20112
|
{
|
|
19975
20113
|
title: "Select Preferred Update Manager",
|
|
@@ -20006,7 +20144,7 @@ Selection: ${val}`,
|
|
|
20006
20144
|
}
|
|
20007
20145
|
);
|
|
20008
20146
|
case "update":
|
|
20009
|
-
return /* @__PURE__ */
|
|
20147
|
+
return /* @__PURE__ */ React16.createElement(
|
|
20010
20148
|
UpdateProcessor_default,
|
|
20011
20149
|
{
|
|
20012
20150
|
latest: latestVer,
|
|
@@ -20032,7 +20170,7 @@ Selection: ${val}`,
|
|
|
20032
20170
|
}
|
|
20033
20171
|
);
|
|
20034
20172
|
case "terminalApproval":
|
|
20035
|
-
return /* @__PURE__ */
|
|
20173
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "TERMINAL COMMAND OVERSIGHT"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, null, "Agent requested to run: ", /* @__PURE__ */ React16.createElement(Text16, { color: "yellow", bold: true }, parseArgs(pendingApproval?.args || "{}").command || "Unknown Command"))), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
20036
20174
|
CommandMenu,
|
|
20037
20175
|
{
|
|
20038
20176
|
title: "Risk Assessment Required",
|
|
@@ -20048,7 +20186,18 @@ Selection: ${val}`,
|
|
|
20048
20186
|
}
|
|
20049
20187
|
)));
|
|
20050
20188
|
default:
|
|
20051
|
-
return /* @__PURE__ */
|
|
20189
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "[ ESC to Close ]")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6 }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "ACTIVE SUBAGENTS")), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, width: "100%" }, activeSubagents.filter((sa) => sa.status === "running").map((sa) => /* @__PURE__ */ React16.createElement(SubagentRow, { key: sa.id, sa })))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, null, statusText ? /* @__PURE__ */ React16.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React16.createElement(build_default, null), /* @__PURE__ */ React16.createElement(
|
|
20190
|
+
GlintText_default,
|
|
20191
|
+
{
|
|
20192
|
+
text: statusText.trimEnd(),
|
|
20193
|
+
baseColor: "#B5B8D9",
|
|
20194
|
+
glintColor: "#BFD4DB",
|
|
20195
|
+
speed: 60,
|
|
20196
|
+
italic: true,
|
|
20197
|
+
glintWidth: 2,
|
|
20198
|
+
typeSpeed: 10
|
|
20199
|
+
}
|
|
20200
|
+
), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, activeTime > 0 ? `(${activeTime.toFixed(0)}s)` : "")) : /* @__PURE__ */ React16.createElement(Text16, { color: "grey", italic: true }, input.length > 0 && escPressCount ? "Press ESC again to clear input" : hasPasteBlock ? "Press CTRL + O to expand" : "Waiting for input...")), /* @__PURE__ */ React16.createElement(Box14, null, isProcessing && Date.now() - lastChunkTime > 15e3 && !activeSubagents.some((sa) => sa.status === "running" && !statusText.toLowerCase().includes("waiting")) ? /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(GlintText_default, { text: "Waiting for API", baseColor: "white", glintColor: "gray", glintWidth: 4, speed: 80 }), /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true }, " \u2503 ")) : wittyPhrase ? /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(GlintText_default, { text: wittyPhrase, italic: true, speed: 80, typeSpeed: 15 }), /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true }, " \u2503 ")) : null, /* @__PURE__ */ React16.createElement(GlintText_default, { text: tempModelOverride || activeModel.split("/")[1] || activeModel, baseColor: "white", glintColor: "gray", glintWidth: 3 }))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: "#555555" }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React16.createElement(
|
|
20052
20201
|
Box14,
|
|
20053
20202
|
{
|
|
20054
20203
|
backgroundColor: "#555555",
|
|
@@ -20057,7 +20206,7 @@ Selection: ${val}`,
|
|
|
20057
20206
|
width: "100%",
|
|
20058
20207
|
flexDirection: "column"
|
|
20059
20208
|
},
|
|
20060
|
-
/* @__PURE__ */
|
|
20209
|
+
/* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React16.createElement(Box14, { flexShrink: 0, width: 4 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, isProcessing || isCompressing ? "\u2726 " : " \u276F ")), /* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1, position: "relative" }, input === "" && /* @__PURE__ */ React16.createElement(Box14, { position: "absolute", paddingLeft: 0 }, activeCommand && !isTerminalFocused ? /* @__PURE__ */ React16.createElement(Text16, { color: "yellow" }, isTerminalWaitingForInput ? " Terminal is waiting for user input. Press TAB to interact" : " Press TAB to interact with terminal...") : activeCommand && isTerminalFocused ? /* @__PURE__ */ React16.createElement(Text16, { color: "yellow", bold: true }, " [ TERMINAL FOCUSED ] Type to interact, press TAB to exit...") : escPressCount === 1 ? /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, " Press ESC again to ", input.length > 0 ? "clear input" : "revert codebase to checkpoint", "...") : /* @__PURE__ */ React16.createElement(Text16, { color: "#cccccc" }, escPressed ? " Press ESC again to cancel the request." : isCompressing ? " Compressing session history, please wait..." : !isProcessing ? ` Send message, @file or /cmd ... (${terminalEnv.shortcut} for newline)` : " Enter a prompt to steer the agent.")), /* @__PURE__ */ React16.createElement(
|
|
20061
20210
|
MultilineInput,
|
|
20062
20211
|
{
|
|
20063
20212
|
key: `input-${inputKey}`,
|
|
@@ -20082,10 +20231,10 @@ Selection: ${val}`,
|
|
|
20082
20231
|
}
|
|
20083
20232
|
}
|
|
20084
20233
|
)))))
|
|
20085
|
-
), /* @__PURE__ */
|
|
20234
|
+
), /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: "#555555" }, "\u2580".repeat(Math.max(1, terminalSize.columns))))));
|
|
20086
20235
|
}
|
|
20087
20236
|
};
|
|
20088
|
-
return /* @__PURE__ */
|
|
20237
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, isInitializing ? null : showBridgePromo ? /* @__PURE__ */ React16.createElement(BridgePromo, { width: stdout?.columns || 80, height: stdout?.rows || 24, selectedIndex: promoSelectedIndex, aiProvider }) : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Static, { key: `static-${clearKey}-${chatId}-${terminalSize.columns}-${terminalSize.rows}`, items: parsedBlocks.completed }, (block) => /* @__PURE__ */ React16.createElement(
|
|
20089
20238
|
BlockItem,
|
|
20090
20239
|
{
|
|
20091
20240
|
key: block.key,
|
|
@@ -20095,7 +20244,7 @@ Selection: ${val}`,
|
|
|
20095
20244
|
aiProvider,
|
|
20096
20245
|
version: versionFluxflow
|
|
20097
20246
|
}
|
|
20098
|
-
))), /* @__PURE__ */
|
|
20247
|
+
))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", paddingX: 1, paddingBottom: 0, width: "100%" }, (activeView === "chat" || ["ask", "approval", "terminalApproval"].includes(activeView)) && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, parsedBlocks.active.map((block) => /* @__PURE__ */ React16.createElement(
|
|
20099
20248
|
BlockItem,
|
|
20100
20249
|
{
|
|
20101
20250
|
key: block.key,
|
|
@@ -20105,7 +20254,7 @@ Selection: ${val}`,
|
|
|
20105
20254
|
aiProvider,
|
|
20106
20255
|
version: versionFluxflow
|
|
20107
20256
|
}
|
|
20108
|
-
)), activeCommand && /* @__PURE__ */
|
|
20257
|
+
)), activeCommand && /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(TerminalBox, { command: activeCommand, output: execOutput, isFocused: isTerminalFocused, isPty: isActiveCommandPty, terminalHeight: terminalSize.rows, columns: terminalSize.columns }))), isInitializing ? /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "double", borderColor: "grey", padding: 1, flexShrink: 0 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Starting Flux Flow...")) : !apiKey ? /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "round", borderColor: "white", padding: 0, flexDirection: "column", flexShrink: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", bold: true }, "API KEY REQUIRED")), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, flexDirection: "column" }, setupStep === 0 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Select your Preferred Provider:"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
20109
20258
|
CommandMenu,
|
|
20110
20259
|
{
|
|
20111
20260
|
items: [
|
|
@@ -20119,7 +20268,7 @@ Selection: ${val}`,
|
|
|
20119
20268
|
setSetupStep(1);
|
|
20120
20269
|
}
|
|
20121
20270
|
}
|
|
20122
|
-
))) : /* @__PURE__ */
|
|
20271
|
+
))) : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Please enter your ", aiProvider, " API Key to initialize the agent (If billing is enabled set /settings \u2192 Others \u2192 API Strategy to use premium models. Set budget limit at /budgets.)."), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", bold: true }, " ", ">", " "), /* @__PURE__ */ React16.createElement(
|
|
20123
20272
|
TextInput4,
|
|
20124
20273
|
{
|
|
20125
20274
|
value: tempKey,
|
|
@@ -20127,7 +20276,7 @@ Selection: ${val}`,
|
|
|
20127
20276
|
onSubmit: handleSetup,
|
|
20128
20277
|
mask: "*"
|
|
20129
20278
|
}
|
|
20130
|
-
)), /* @__PURE__ */
|
|
20279
|
+
)), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Press ESC to go back to provider selection)")))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, setupStep === 0 ? "(Use arrows to select and Enter to confirm)" : "(Press Enter to confirm and initialize)"))) : renderActiveView(), confirmExit && /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "round", borderColor: "white", paddingX: 2, marginY: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "\u{1F534} EXIT CONFIRMATION: "), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Press "), /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "CTRL + C"), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " again to exit (", exitCountdown, "s). Press "), /* @__PURE__ */ React16.createElement(Text16, { color: "gray", bold: true }, "ESC"), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " to cancel.")), suggestions.length > 0 && (() => {
|
|
20131
20280
|
const windowSize = 5;
|
|
20132
20281
|
let startIdx = suggestionOffsetRef.current;
|
|
20133
20282
|
if (selectedIndex < startIdx) {
|
|
@@ -20139,14 +20288,14 @@ Selection: ${val}`,
|
|
|
20139
20288
|
suggestionOffsetRef.current = startIdx;
|
|
20140
20289
|
const visible = suggestions.slice(startIdx, startIdx + windowSize);
|
|
20141
20290
|
const remaining = suggestions.length - (startIdx + visible.length);
|
|
20142
|
-
return /* @__PURE__ */
|
|
20291
|
+
return /* @__PURE__ */ React16.createElement(
|
|
20143
20292
|
Box14,
|
|
20144
20293
|
{
|
|
20145
20294
|
flexDirection: "column",
|
|
20146
20295
|
width: "100%",
|
|
20147
20296
|
marginBottom: 1
|
|
20148
20297
|
},
|
|
20149
|
-
/* @__PURE__ */
|
|
20298
|
+
/* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, suggestions[0]?.cmd?.startsWith("@") ? "FILE SUGGESTIONS" : "COMMAND SUGGESTIONS"), suggestions[0]?.cmd?.startsWith("@") ? /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Use '#Lstart-Lend' to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
|
|
20150
20299
|
let url = "https://aistudio.google.com/billing";
|
|
20151
20300
|
let label = "billing";
|
|
20152
20301
|
if (aiProvider === "DeepSeek") {
|
|
@@ -20159,13 +20308,13 @@ Selection: ${val}`,
|
|
|
20159
20308
|
url = "https://build.nvidia.com/settings/api-keys";
|
|
20160
20309
|
label = "billing";
|
|
20161
20310
|
}
|
|
20162
|
-
return /* @__PURE__ */
|
|
20311
|
+
return /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, "Paid API Strategy has more models. Configure ", /* @__PURE__ */ React16.createElement(Text16, { color: "cyan", underline: true }, `\x1B]8;;${url}\x07${label}\x1B]8;;\x07`), " & /settings");
|
|
20163
20312
|
})() : null),
|
|
20164
|
-
visible.map((s, i) => {
|
|
20313
|
+
visible.slice(0, suggestionVisibleCount).map((s, i) => {
|
|
20165
20314
|
const actualIdx = startIdx + i;
|
|
20166
20315
|
const isActive = actualIdx === selectedIndex;
|
|
20167
20316
|
const isGemmaDisabled = s.cmd === "gemma-4-31b-it" && apiTier !== "Free";
|
|
20168
|
-
return /* @__PURE__ */
|
|
20317
|
+
return /* @__PURE__ */ React16.createElement(
|
|
20169
20318
|
Box14,
|
|
20170
20319
|
{
|
|
20171
20320
|
key: s.cmd,
|
|
@@ -20173,9 +20322,9 @@ Selection: ${val}`,
|
|
|
20173
20322
|
backgroundColor: isActive ? "#2a2a2a" : void 0,
|
|
20174
20323
|
paddingX: 1
|
|
20175
20324
|
},
|
|
20176
|
-
/* @__PURE__ */
|
|
20177
|
-
/* @__PURE__ */
|
|
20178
|
-
|
|
20325
|
+
/* @__PURE__ */ React16.createElement(Box14, { width: 3 }, /* @__PURE__ */ React16.createElement(Text16, { color: isActive ? "white" : "gray", bold: isActive }, isActive ? " \u276F" : " ")),
|
|
20326
|
+
/* @__PURE__ */ React16.createElement(Box14, { width: 55 }, /* @__PURE__ */ React16.createElement(
|
|
20327
|
+
Text16,
|
|
20179
20328
|
{
|
|
20180
20329
|
color: isGemmaDisabled ? "gray" : isActive ? "white" : "grey",
|
|
20181
20330
|
bold: isActive
|
|
@@ -20186,12 +20335,12 @@ Selection: ${val}`,
|
|
|
20186
20335
|
return parts[parts.length - 1];
|
|
20187
20336
|
})() : s.cmd
|
|
20188
20337
|
)),
|
|
20189
|
-
/* @__PURE__ */
|
|
20338
|
+
/* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: `${!isActive ? "gray" : "white"}`, italic: true }, s.desc))
|
|
20190
20339
|
);
|
|
20191
20340
|
}),
|
|
20192
|
-
suggestions.length > 5 && /* @__PURE__ */
|
|
20341
|
+
suggestions.length > 5 && /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, height: 1 }, remaining > 0 ? /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, " ... (", remaining, " more commands available)") : /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, " (End of list)"))
|
|
20193
20342
|
);
|
|
20194
|
-
})(), /* @__PURE__ */
|
|
20343
|
+
})(), /* @__PURE__ */ React16.createElement(Box14, { flexShrink: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(
|
|
20195
20344
|
StatusBar_default,
|
|
20196
20345
|
{
|
|
20197
20346
|
mode,
|
|
@@ -20213,7 +20362,7 @@ Selection: ${val}`,
|
|
|
20213
20362
|
const agentActiveMs = sessionApiTime + sessionToolTime;
|
|
20214
20363
|
const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
20215
20364
|
const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
20216
|
-
return /* @__PURE__ */
|
|
20365
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: "grey", width: Math.min(100, (stdout?.columns || 100) - 2), marginTop: 0, marginBottom: 0 }, /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { bold: true }, gradient2(["blue", "purple"])("Agent powering down. Goodbye!"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, chatId)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, runtimeSession.toolSuccess + runtimeSession.toolFailure + runtimeSession.toolDenied, " ( ", /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "\u2714 ", runtimeSession.toolSuccess), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "yellow" }, "\u{1F6C7} ", runtimeSession.toolDenied), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "\u2718 ", runtimeSession.toolFailure), " )")), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, successRate, "%")), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Code Changes:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "+", runtimeSession.linesAdded), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "-", runtimeSession.linesRemoved))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 16 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits")))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
|
|
20217
20366
|
})())));
|
|
20218
20367
|
}
|
|
20219
20368
|
var shouldClearValue, getPrefilledValue, getIDEName, getIDEDirName, getKeybindingsPath, parseJsonc, hasShiftEnterBinding, getPromoOptions, BridgePromo, SESSION_START_TIME, CHANGELOG_URL, DOCS_URL, packageJsonPath, packageJson, versionFluxflow, updatedOn, ResolutionModal, parseAgentText, getProjectFiles, cachedShortcut, getLatencyColor2, SubagentRow;
|
|
@@ -20249,6 +20398,7 @@ var init_app = __esm({
|
|
|
20249
20398
|
init_setup();
|
|
20250
20399
|
init_text();
|
|
20251
20400
|
init_editor();
|
|
20401
|
+
init_GlintText();
|
|
20252
20402
|
shouldClearValue = (val) => {
|
|
20253
20403
|
const s = String(val);
|
|
20254
20404
|
return s.startsWith("999") && s.endsWith("9");
|
|
@@ -20331,7 +20481,7 @@ var init_app = __esm({
|
|
|
20331
20481
|
BridgePromo = ({ width, height, selectedIndex, aiProvider }) => {
|
|
20332
20482
|
const ideName = getIDEName();
|
|
20333
20483
|
const options = getPromoOptions(ideName);
|
|
20334
|
-
return /* @__PURE__ */
|
|
20484
|
+
return /* @__PURE__ */ React16.createElement(
|
|
20335
20485
|
Box14,
|
|
20336
20486
|
{
|
|
20337
20487
|
flexDirection: "column",
|
|
@@ -20340,8 +20490,8 @@ var init_app = __esm({
|
|
|
20340
20490
|
width,
|
|
20341
20491
|
height
|
|
20342
20492
|
},
|
|
20343
|
-
/* @__PURE__ */
|
|
20344
|
-
/* @__PURE__ */
|
|
20493
|
+
/* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React16.createElement(Text16, null, getFluxLogo(versionFluxflow, aiProvider))),
|
|
20494
|
+
/* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "double", borderColor: "grey", paddingX: 3, paddingY: 1, width: Math.min(80, width - 4) }, /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "white", textAlign: "center" }, "\u{1F680} UPGRADE YOUR WORKFLOW"), /* @__PURE__ */ React16.createElement(Box14, { marginY: 1, flexDirection: "column", alignItems: "left" }, /* @__PURE__ */ React16.createElement(Text16, null, "You're in ", /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "cyan" }, ideName), ", but the ", /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "white" }, "FluxFlow-CLI Companion"), " is not installed."), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Real-time IDE context & Error Resolution"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Auto-open files created by agent"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Native DIFFing for AI edits"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Direct IDE context sharing"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Surgical Diagnostic Sync"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Native Right-Click \u276F Chat integration"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Live Status in IDE"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Clickable terminal-to-code links"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, options.map((opt, i) => /* @__PURE__ */ React16.createElement(Box14, { key: i }, /* @__PURE__ */ React16.createElement(Text16, { color: selectedIndex === i ? "yellow" : "white", bold: selectedIndex === i }, selectedIndex === i ? " \u276F " : " ", opt.label)))), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(Text16, { dimColor: true, italic: true }, "(Use arrows to navigate, Enter to select)")))
|
|
20345
20495
|
);
|
|
20346
20496
|
};
|
|
20347
20497
|
SESSION_START_TIME = Date.now();
|
|
@@ -20351,7 +20501,7 @@ var init_app = __esm({
|
|
|
20351
20501
|
packageJson = JSON.parse(fs24.readFileSync(packageJsonPath, "utf8"));
|
|
20352
20502
|
versionFluxflow = packageJson.version;
|
|
20353
20503
|
updatedOn = packageJson.date || "2026-05-20";
|
|
20354
|
-
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */
|
|
20504
|
+
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", padding: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, data.startsWith("/btw") ? "QUESTION" : "STEERING HINT", " RESOLUTION")), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, null, "The agent already finished the task before your ", data.startsWith("/btw") ? "question" : "hint", " was consumed.")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, backgroundColor: "#222", paddingX: 2, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { italic: true, color: "gray" }, '"', data.replace("/btw", "").trim(), '"')), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "How would you like to proceed?")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 0 }, /* @__PURE__ */ React16.createElement(
|
|
20355
20505
|
CommandMenu,
|
|
20356
20506
|
{
|
|
20357
20507
|
title: "Select Action",
|
|
@@ -20471,10 +20621,10 @@ var init_app = __esm({
|
|
|
20471
20621
|
})();
|
|
20472
20622
|
cachedShortcut = "Ctrl + Enter";
|
|
20473
20623
|
getLatencyColor2 = (delay) => {
|
|
20474
|
-
if (delay <=
|
|
20624
|
+
if (delay <= 370) return "#00a564";
|
|
20475
20625
|
if (delay >= 5e3) return "#ff0000";
|
|
20476
20626
|
const points = [
|
|
20477
|
-
{ t:
|
|
20627
|
+
{ t: 370, r: 0, g: 165, b: 100 },
|
|
20478
20628
|
{ t: 800, r: 120, g: 220, b: 80 },
|
|
20479
20629
|
{ t: 1500, r: 250, g: 210, b: 40 },
|
|
20480
20630
|
{ t: 3e3, r: 255, g: 120, b: 0 },
|
|
@@ -20493,10 +20643,10 @@ var init_app = __esm({
|
|
|
20493
20643
|
}
|
|
20494
20644
|
return "#ff0000";
|
|
20495
20645
|
};
|
|
20496
|
-
SubagentRow =
|
|
20497
|
-
const [dotColor, setDotColor] =
|
|
20646
|
+
SubagentRow = React16.memo(({ sa }) => {
|
|
20647
|
+
const [dotColor, setDotColor] = useState15("green");
|
|
20498
20648
|
const chunkTimesRef = useRef4([]);
|
|
20499
|
-
|
|
20649
|
+
useEffect12(() => {
|
|
20500
20650
|
if (sa.status !== "running") {
|
|
20501
20651
|
chunkTimesRef.current = [];
|
|
20502
20652
|
return;
|
|
@@ -20533,7 +20683,7 @@ var init_app = __esm({
|
|
|
20533
20683
|
const timer = setInterval(checkLatency, 100);
|
|
20534
20684
|
return () => clearInterval(timer);
|
|
20535
20685
|
}, [sa.status, sa.lastChunkTime]);
|
|
20536
|
-
return /* @__PURE__ */
|
|
20686
|
+
return /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " \u2022 ", sa.title, " ", /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true }, "(", sa.id, ")")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true, bold: true }, sa.currentTool || "Active"), /* @__PURE__ */ React16.createElement(Text16, { color: dotColor }, " \u25CF")));
|
|
20537
20687
|
});
|
|
20538
20688
|
}
|
|
20539
20689
|
});
|
|
@@ -20687,9 +20837,9 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
20687
20837
|
process.exit(0);
|
|
20688
20838
|
}
|
|
20689
20839
|
const promptPackageManager = async () => {
|
|
20690
|
-
const
|
|
20691
|
-
const { useState:
|
|
20692
|
-
const { render: render2, Box: Box15, Text:
|
|
20840
|
+
const React18 = (await import("react")).default;
|
|
20841
|
+
const { useState: useState16 } = React18;
|
|
20842
|
+
const { render: render2, Box: Box15, Text: Text17 } = await import("ink");
|
|
20693
20843
|
const SelectInput3 = (await import("ink-select-input")).default;
|
|
20694
20844
|
const TextInput5 = (await import("ink-text-input")).default;
|
|
20695
20845
|
return new Promise((resolve) => {
|
|
@@ -20701,12 +20851,12 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
20701
20851
|
{ label: "Custom Command", value: "custom" }
|
|
20702
20852
|
];
|
|
20703
20853
|
const CustomItem2 = ({ label, isSelected }) => {
|
|
20704
|
-
return /* @__PURE__ */
|
|
20854
|
+
return /* @__PURE__ */ React18.createElement(Box15, { width: "100%" }, /* @__PURE__ */ React18.createElement(Text17, { bold: isSelected }, "\u2514\u2500 ", isSelected ? "\x1B[32m\u25CF\x1B[0m" : "\u25CB", " ", label));
|
|
20705
20855
|
};
|
|
20706
20856
|
let unmountFn;
|
|
20707
20857
|
const PromptComponent = () => {
|
|
20708
|
-
const [step, setStep] =
|
|
20709
|
-
const [customCommand2, setCustomCommand] =
|
|
20858
|
+
const [step, setStep] = useState16("select");
|
|
20859
|
+
const [customCommand2, setCustomCommand] = useState16("");
|
|
20710
20860
|
const handleSelect = (item) => {
|
|
20711
20861
|
if (item.value === "custom") {
|
|
20712
20862
|
setStep("custom");
|
|
@@ -20718,16 +20868,16 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
20718
20868
|
cleanupAndResolve({ manager: "custom", customCommand: value });
|
|
20719
20869
|
};
|
|
20720
20870
|
if (step === "custom") {
|
|
20721
|
-
return /* @__PURE__ */
|
|
20871
|
+
return /* @__PURE__ */ React18.createElement(Box15, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React18.createElement(Box15, { marginBottom: 1 }, /* @__PURE__ */ React18.createElement(Text17, { color: "magenta", bold: true }, "\u{1F527} Enter custom update command:")), /* @__PURE__ */ React18.createElement(Box15, { flexDirection: "row" }, /* @__PURE__ */ React18.createElement(Text17, { color: "cyan", bold: true }, " \u276F "), /* @__PURE__ */ React18.createElement(
|
|
20722
20872
|
TextInput5,
|
|
20723
20873
|
{
|
|
20724
20874
|
value: customCommand2,
|
|
20725
20875
|
onChange: setCustomCommand,
|
|
20726
20876
|
onSubmit: handleCustomSubmit
|
|
20727
20877
|
}
|
|
20728
|
-
)), /* @__PURE__ */
|
|
20878
|
+
)), /* @__PURE__ */ React18.createElement(Box15, { marginTop: 1 }, /* @__PURE__ */ React18.createElement(Text17, { color: "gray", dimColor: true, italic: true }, " (Press Enter to confirm)")));
|
|
20729
20879
|
}
|
|
20730
|
-
return /* @__PURE__ */
|
|
20880
|
+
return /* @__PURE__ */ React18.createElement(Box15, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React18.createElement(Box15, { marginBottom: 1 }, /* @__PURE__ */ React18.createElement(Text17, { color: "magenta", bold: true }, "\u{1F4E6} Select a package manager for the update:")), /* @__PURE__ */ React18.createElement(
|
|
20731
20881
|
SelectInput3,
|
|
20732
20882
|
{
|
|
20733
20883
|
items,
|
|
@@ -20741,7 +20891,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
20741
20891
|
if (unmountFn) unmountFn();
|
|
20742
20892
|
resolve(val);
|
|
20743
20893
|
};
|
|
20744
|
-
const { unmount } = render2(/* @__PURE__ */
|
|
20894
|
+
const { unmount } = render2(/* @__PURE__ */ React18.createElement(PromptComponent, null));
|
|
20745
20895
|
unmountFn = unmount;
|
|
20746
20896
|
});
|
|
20747
20897
|
};
|
|
@@ -20781,7 +20931,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
20781
20931
|
}
|
|
20782
20932
|
}
|
|
20783
20933
|
}
|
|
20784
|
-
const { default:
|
|
20934
|
+
const { default: React17 } = await import("react");
|
|
20785
20935
|
const { render } = await import("ink");
|
|
20786
20936
|
const { default: App2 } = await init_app().then(() => app_exports);
|
|
20787
20937
|
process.env.NODE_NO_WARNINGS = "1";
|
|
@@ -20834,5 +20984,5 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
20834
20984
|
} catch (e) {
|
|
20835
20985
|
}
|
|
20836
20986
|
}
|
|
20837
|
-
render(/* @__PURE__ */
|
|
20987
|
+
render(/* @__PURE__ */ React17.createElement(App2, { args: process.argv.slice(2) }), { exitOnCtrlC: false });
|
|
20838
20988
|
}
|