fluxflow-cli 2.8.8 → 2.8.10
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 +143 -15
- package/package.json +2 -2
package/dist/fluxflow.js
CHANGED
|
@@ -4922,9 +4922,7 @@ ${tail}`;
|
|
|
4922
4922
|
|
|
4923
4923
|
- Stats: [${verifiedLineCount} lines, ${(verifiedSize / 1024).toFixed(1)} KB]
|
|
4924
4924
|
${ancestry}- Content Preview:
|
|
4925
|
-
${snippet}
|
|
4926
|
-
|
|
4927
|
-
[SYSTEM] Check the content preview for verification [/SYSTEM]`;
|
|
4925
|
+
${snippet}`;
|
|
4928
4926
|
} catch (err) {
|
|
4929
4927
|
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
4930
4928
|
return `ERROR: Failed to write file [${targetPath}]: ${errorMsg}`;
|
|
@@ -8034,7 +8032,7 @@ ${ideCtx.warnings}
|
|
|
8034
8032
|
CWD: ${process.cwd()}${cwdMismatch ? ` (WARNING: CWD Mismatch! Previous Path: ${lastCwd})` : ""}
|
|
8035
8033
|
**DIRECTORY STRUCTURE**
|
|
8036
8034
|
${dirStructure}${memoryPrompt}${ideBlock}
|
|
8037
|
-
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think
|
|
8035
|
+
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[USER] ${cleanAgentText.trim()} [/USER]`.trim();
|
|
8038
8036
|
modifiedHistory.push({ role: "user", text: firstUserMsg });
|
|
8039
8037
|
if (activeSummaryBlock && history[history.length - 1]?.id) {
|
|
8040
8038
|
yield { type: "summary_injected", content: { id: history[history.length - 1].id, text: firstUserMsg } };
|
|
@@ -8057,7 +8055,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
8057
8055
|
modifiedHistory = getTruncatedHistory(modifiedHistory, 6);
|
|
8058
8056
|
}
|
|
8059
8057
|
if (loop > 0) {
|
|
8060
|
-
yield { type: "status", content: "Working
|
|
8058
|
+
yield { type: "status", content: "Working..." };
|
|
8061
8059
|
}
|
|
8062
8060
|
if (TERMINATION_SIGNAL) {
|
|
8063
8061
|
yield { type: "status", content: "Request Cancelled" };
|
|
@@ -8072,7 +8070,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
8072
8070
|
|
|
8073
8071
|
[STEERING HINT]: ${hint}`;
|
|
8074
8072
|
} else {
|
|
8075
|
-
modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think
|
|
8073
|
+
modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[STEERING HINT]: ${hint}` });
|
|
8076
8074
|
}
|
|
8077
8075
|
yield { type: "status", content: "Steering Hint Injected." };
|
|
8078
8076
|
}
|
|
@@ -8205,13 +8203,13 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
8205
8203
|
const ideErr = ideCtxJIT ? ideCtxJIT.diagnostics : null;
|
|
8206
8204
|
if (ideErr && lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text) {
|
|
8207
8205
|
lastUserMsg.parts[0].text += `
|
|
8208
|
-
|
|
8206
|
+
${ideErr} [/ERROR]`;
|
|
8209
8207
|
}
|
|
8210
8208
|
}
|
|
8211
8209
|
const isGemma = modelName && modelName.toLowerCase().startsWith("gemma") && aiProvider === "Google";
|
|
8212
8210
|
if (isGemma) {
|
|
8213
8211
|
const jitInstruction = `
|
|
8214
|
-
[SYSTEM] Tool result received. Analyze output and proceed with your turn${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `. **STRICTLY MAINTAIN THINKING POLICY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**` : ""}[/SYSTEM]`;
|
|
8212
|
+
[SYSTEM] Tool result received. Analyze output and proceed with your turn${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `. **STRICTLY MAINTAIN THINKING POLICY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**` : ""} [/SYSTEM]`;
|
|
8215
8213
|
if (lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text?.startsWith("[TOOL RESULT]")) {
|
|
8216
8214
|
lastUserMsg.parts[0].text += jitInstruction;
|
|
8217
8215
|
}
|
|
@@ -8221,7 +8219,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
8221
8219
|
const currentStep = loop + 1;
|
|
8222
8220
|
if (currentStep >= stepThreshold && lastUserMsg && lastUserMsg.parts?.[0]) {
|
|
8223
8221
|
lastUserMsg.parts[0].text += `
|
|
8224
|
-
[SYSTEM] WARNING, Turn Limit Impending: Step ${currentStep}/${MAX_LOOPS}. Wrap up quickly/prompt user to continue & use [[END]] quickly.[/SYSTEM]`;
|
|
8222
|
+
[SYSTEM] WARNING, Turn Limit Impending: Step ${currentStep}/${MAX_LOOPS}. Wrap up quickly/prompt user to continue & use [[END]] quickly. [/SYSTEM]`;
|
|
8225
8223
|
}
|
|
8226
8224
|
}
|
|
8227
8225
|
const abortPromise = new Promise((_, reject) => {
|
|
@@ -8432,7 +8430,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
8432
8430
|
]);
|
|
8433
8431
|
if (done) break;
|
|
8434
8432
|
if (isFirstChunk) {
|
|
8435
|
-
yield { type: "status", content: "
|
|
8433
|
+
yield { type: "status", content: "Thinking..." };
|
|
8436
8434
|
isFirstChunk = false;
|
|
8437
8435
|
}
|
|
8438
8436
|
if (TERMINATION_SIGNAL) {
|
|
@@ -9455,7 +9453,7 @@ ${boxBottom}` };
|
|
|
9455
9453
|
const waitTime = Math.min(1e3 * Math.pow(2, inStreamRetryCount - 1), 24e3);
|
|
9456
9454
|
if (turnText.trim().length > 0) {
|
|
9457
9455
|
modifiedHistory.push({ role: "agent", text: turnText });
|
|
9458
|
-
const recoveryText = "[SYSTEM]\n- SEAMLESS CONTINUATION: Resume immediately. Pick up from last words with zero gap/disruption\n- NO REPETITION: Do not repeat any text already written\n- NO RE-THINK: Do not restart or open <think> if reasoning already started. Continue the thinking and close thinking block </think> if opened before outputting user response\n- MID-TOOL SAFETY: If cutoff was mid-tool call, restart that tool call from start\n- STEALTH: Do not mention/apologize for cutoff[/SYSTEM]";
|
|
9456
|
+
const recoveryText = "[SYSTEM]\n- SEAMLESS CONTINUATION: Resume immediately. Pick up from last words with zero gap/disruption\n- NO REPETITION: Do not repeat any text already written\n- NO RE-THINK: Do not restart or open <think> if reasoning already started. Continue the thinking and close thinking block </think> if opened before outputting user response\n- MID-TOOL SAFETY: If cutoff was mid-tool call, restart that tool call from start\n- STEALTH: Do not mention/apologize for cutoff [/SYSTEM]";
|
|
9459
9457
|
if (toolResults.length > 0) {
|
|
9460
9458
|
toolResults.forEach((tr, idx) => {
|
|
9461
9459
|
if (idx === toolResults.length - 1) {
|
|
@@ -9528,7 +9526,7 @@ Error Log can be found in ${path19.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
9528
9526
|
const hasFinish = /\[\s*(turn\s*:)?\s*finish\s*\]/i.test(signalSafeText.toLowerCase()) || /\[\[END\]\]/i.test(signalSafeText.toLowerCase()) || true;
|
|
9529
9527
|
const hasContinue = /\[\s*(turn\s*:)?\s*continue\s*\]/i.test(signalSafeText.toLowerCase());
|
|
9530
9528
|
const shouldContinue = toolCallPointer > 0;
|
|
9531
|
-
yield { type: "status", content: "
|
|
9529
|
+
yield { type: "status", content: "Thinking..." };
|
|
9532
9530
|
const cleanedTurnText = contextSafeReplace(turnText, /(\[\s*(turn\s*:)?\s*(continue|finish)\s*\]|\[\[END\]\])/gi, "").trim();
|
|
9533
9531
|
let isActuallyFinished = (hasFinish || toolResults.length === 0) && !isThinkingLoop && !isStutteringLoop && !isGeneralLoop;
|
|
9534
9532
|
isActuallyFinished = toolResults.length === 0 ? isActuallyFinished : false;
|
|
@@ -9561,7 +9559,7 @@ Error Log can be found in ${path19.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
9561
9559
|
}
|
|
9562
9560
|
} else {
|
|
9563
9561
|
if (wasToolCalledInLastLoop) {
|
|
9564
|
-
modifiedHistory.push({ role: "user", text: `[SYSTEM] Failed to verify tool execution, Verify tool syntax, proper escaping or ask user if tool worked when unsure[/SYSTEM]` });
|
|
9562
|
+
modifiedHistory.push({ role: "user", text: `[SYSTEM] Failed to verify tool execution, Verify tool syntax, proper escaping or ask user if tool worked when unsure [/SYSTEM]` });
|
|
9565
9563
|
} else {
|
|
9566
9564
|
modifiedHistory.push({ role: "user", text: `[SYSTEM] ${isStutteringLoop && !isThinkingLoop ? `STUTTERING DETECTED by Internal System. Re-calibrate your response & proceed.` : `${isThinkingLoop ? " OVER THINKING" : " LOOP"} DETECTED by Internal System${isThinkingLoop ? " for current EFFORT_LEVEL" : ""}. ${isThinkingLoop ? "If you have planned the task, prioritize execution/output" : "If you have finished your task use [[END]]"}`} [/SYSTEM]` });
|
|
9567
9565
|
}
|
|
@@ -10649,6 +10647,56 @@ function App({ args = [] }) {
|
|
|
10649
10647
|
const lastFocusEventTime = useRef3(0);
|
|
10650
10648
|
const [apiKey, setApiKey] = useState11(null);
|
|
10651
10649
|
const [tempKey, setTempKey] = useState11("");
|
|
10650
|
+
const addShiftEnterBinding = async (ideName) => {
|
|
10651
|
+
const kbPath = getKeybindingsPath(ideName);
|
|
10652
|
+
if (!kbPath) return;
|
|
10653
|
+
try {
|
|
10654
|
+
await fs22.ensureDir(path20.dirname(kbPath));
|
|
10655
|
+
let bindings = [];
|
|
10656
|
+
if (fs22.existsSync(kbPath)) {
|
|
10657
|
+
const content = fs22.readFileSync(kbPath, "utf8").trim();
|
|
10658
|
+
if (content) {
|
|
10659
|
+
try {
|
|
10660
|
+
bindings = parseJsonc(content);
|
|
10661
|
+
} catch (e) {
|
|
10662
|
+
bindings = [];
|
|
10663
|
+
}
|
|
10664
|
+
}
|
|
10665
|
+
}
|
|
10666
|
+
if (!Array.isArray(bindings)) {
|
|
10667
|
+
bindings = [];
|
|
10668
|
+
}
|
|
10669
|
+
bindings.push({
|
|
10670
|
+
"key": "shift+enter",
|
|
10671
|
+
"command": "workbench.action.terminal.sendSequence",
|
|
10672
|
+
"args": {
|
|
10673
|
+
"text": "\x1B[13;2u"
|
|
10674
|
+
},
|
|
10675
|
+
"when": "terminalFocus"
|
|
10676
|
+
});
|
|
10677
|
+
fs22.writeFileSync(kbPath, JSON.stringify(bindings, null, 4), "utf8");
|
|
10678
|
+
cachedShortcut = "Shift + Enter";
|
|
10679
|
+
setMessages((prev) => {
|
|
10680
|
+
setCompletedIndex(prev.length + 1);
|
|
10681
|
+
return [...prev, {
|
|
10682
|
+
id: "kb-success-" + Date.now(),
|
|
10683
|
+
role: "system",
|
|
10684
|
+
text: `\u2705 Successfully configured Shift+Enter in your ${ideName} keybindings!`,
|
|
10685
|
+
isMeta: true
|
|
10686
|
+
}];
|
|
10687
|
+
});
|
|
10688
|
+
} catch (err) {
|
|
10689
|
+
setMessages((prev) => {
|
|
10690
|
+
setCompletedIndex(prev.length + 1);
|
|
10691
|
+
return [...prev, {
|
|
10692
|
+
id: "kb-error-" + Date.now(),
|
|
10693
|
+
role: "system",
|
|
10694
|
+
text: `\u274C Failed to update keybindings: ${err.message}`,
|
|
10695
|
+
isMeta: true
|
|
10696
|
+
}];
|
|
10697
|
+
});
|
|
10698
|
+
}
|
|
10699
|
+
};
|
|
10652
10700
|
const [activeView, setActiveView] = useState11("chat");
|
|
10653
10701
|
const [apiTier, setApiTier] = useState11("Free");
|
|
10654
10702
|
const [quotas, setQuotas] = useState11({ agentLimit: 999999, backgroundLimit: 999999, searchLimit: 100, customModelId: "", customLimit: 0 });
|
|
@@ -10771,7 +10819,9 @@ function App({ args = [] }) {
|
|
|
10771
10819
|
const isIDE = !["Terminal", "Windows Terminal"].includes(ideName) || !!process.env.VSC_TERMINAL_URL || !!process.env.INTELLIJ_TERMINAL_COMMAND_BLOCKS;
|
|
10772
10820
|
return {
|
|
10773
10821
|
isIDE,
|
|
10774
|
-
shortcut
|
|
10822
|
+
get shortcut() {
|
|
10823
|
+
return cachedShortcut;
|
|
10824
|
+
}
|
|
10775
10825
|
};
|
|
10776
10826
|
}, []);
|
|
10777
10827
|
const activeCommandRef = useRef3(null);
|
|
@@ -11237,6 +11287,28 @@ function App({ args = [] }) {
|
|
|
11237
11287
|
setMessages((prev) => [...prev, { id: "sys-err-" + Date.now(), role: "system", text: `ERROR: Chat session [${id}] not found. Started new session.`, isMeta: true }]);
|
|
11238
11288
|
}
|
|
11239
11289
|
}
|
|
11290
|
+
const detectedIde = getIDEName();
|
|
11291
|
+
const isIDE = !["Terminal", "Windows Terminal"].includes(detectedIde);
|
|
11292
|
+
if (isIDE) {
|
|
11293
|
+
const kbPath = getKeybindingsPath(detectedIde);
|
|
11294
|
+
if (kbPath) {
|
|
11295
|
+
try {
|
|
11296
|
+
let bindings = [];
|
|
11297
|
+
if (fs22.existsSync(kbPath)) {
|
|
11298
|
+
const content = fs22.readFileSync(kbPath, "utf8").trim();
|
|
11299
|
+
if (content) {
|
|
11300
|
+
bindings = parseJsonc(content);
|
|
11301
|
+
}
|
|
11302
|
+
}
|
|
11303
|
+
if (!hasShiftEnterBinding(bindings)) {
|
|
11304
|
+
setActiveView("keybindingsPrompt");
|
|
11305
|
+
} else {
|
|
11306
|
+
cachedShortcut = "Shift + Enter";
|
|
11307
|
+
}
|
|
11308
|
+
} catch (e) {
|
|
11309
|
+
}
|
|
11310
|
+
}
|
|
11311
|
+
}
|
|
11240
11312
|
setIsInitializing(false);
|
|
11241
11313
|
}
|
|
11242
11314
|
init();
|
|
@@ -13222,6 +13294,25 @@ Selection: ${val}`,
|
|
|
13222
13294
|
onClose: () => setActiveView("chat")
|
|
13223
13295
|
}
|
|
13224
13296
|
));
|
|
13297
|
+
case "keybindingsPrompt":
|
|
13298
|
+
return /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React14.createElement(Text14, { color: "cyan", bold: true, underline: true }, "\u2328\uFE0F CONFIGURE SHIFT+ENTER NEWLINE"), /* @__PURE__ */ React14.createElement(Text14, { marginTop: 1 }, "To support multi-line inputs with ", /* @__PURE__ */ React14.createElement(Text14, { bold: true, color: "white" }, "Shift + Enter"), " for newline, a terminal sequence keybinding needs to be added to your IDE configuration."), /* @__PURE__ */ React14.createElement(Text14, { marginTop: 1 }, "Would you like FluxFlow to automatically add this to your ", getIDEName(), " keybindings?"), /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(
|
|
13299
|
+
CommandMenu,
|
|
13300
|
+
{
|
|
13301
|
+
title: "Add Keybinding?",
|
|
13302
|
+
items: [
|
|
13303
|
+
{ label: "Yes, configure automatically", value: "yes" },
|
|
13304
|
+
{ label: "No, skip", value: "no" }
|
|
13305
|
+
],
|
|
13306
|
+
onSelect: async (item) => {
|
|
13307
|
+
if (item.value === "yes") {
|
|
13308
|
+
await addShiftEnterBinding(getIDEName());
|
|
13309
|
+
} else {
|
|
13310
|
+
cachedShortcut = "\\ + Enter";
|
|
13311
|
+
}
|
|
13312
|
+
setActiveView("chat");
|
|
13313
|
+
}
|
|
13314
|
+
}
|
|
13315
|
+
)));
|
|
13225
13316
|
case "memory":
|
|
13226
13317
|
return /* @__PURE__ */ React14.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React14.createElement(MemoryModal, { onClose: () => setActiveView("chat") }));
|
|
13227
13318
|
case "parserDownload":
|
|
@@ -13554,7 +13645,7 @@ Selection: ${val}`,
|
|
|
13554
13645
|
return /* @__PURE__ */ React14.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__ */ React14.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { bold: true }, gradient2(["blue", "purple"])("Agent powering down. Goodbye!"))), /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, chatId)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( ", /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "\u2713 ", sessionToolSuccess), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "yellow" }, "\u2298 ", sessionToolDenied), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "\u2715 ", sessionToolFailure), " )")), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, successRate, "%")), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Code Changes:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalTokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 18 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 16 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 18 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits")))), /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 20 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 18 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 18 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
|
|
13555
13646
|
})())));
|
|
13556
13647
|
}
|
|
13557
|
-
var getIDEName, getPromoOptions, BridgePromo, SESSION_START_TIME, CHANGELOG_URL, DOCS_URL, linesAdded, linesRemoved, packageJsonPath, packageJson, versionFluxflow, updatedOn, ResolutionModal, parseAgentText, getProjectFiles;
|
|
13648
|
+
var getIDEName, getIDEDirName, getKeybindingsPath, parseJsonc, hasShiftEnterBinding, getPromoOptions, BridgePromo, SESSION_START_TIME, CHANGELOG_URL, DOCS_URL, linesAdded, linesRemoved, packageJsonPath, packageJson, versionFluxflow, updatedOn, ResolutionModal, parseAgentText, getProjectFiles, cachedShortcut;
|
|
13558
13649
|
var init_app = __esm({
|
|
13559
13650
|
async "src/app.jsx"() {
|
|
13560
13651
|
init_MultilineInput();
|
|
@@ -13602,10 +13693,46 @@ var init_app = __esm({
|
|
|
13602
13693
|
if (termProgram === "trae" || inEnvVars("trae")) return "Trae";
|
|
13603
13694
|
if (termProgram === "codium" || inEnvVars("codium") || inEnvVars("vscode-oss")) return "VSCodium";
|
|
13604
13695
|
if (inEnvVars("positron")) return "Positron";
|
|
13696
|
+
if (termProgram === "vscode-insiders" || inEnvVars("insiders")) return "VS Code Insiders";
|
|
13605
13697
|
if (termProgram === "vscode" || process.env.VSCODE_GIT_IPC_HANDLE || inEnvVars("vscode")) return "VS Code";
|
|
13606
13698
|
if (process.env.INTELLIJ_TERMINAL_COMMAND_BLOCKS || inEnvVars("intellij")) return "JetBrains";
|
|
13607
13699
|
return "Terminal";
|
|
13608
13700
|
};
|
|
13701
|
+
getIDEDirName = (ideName) => {
|
|
13702
|
+
switch (ideName) {
|
|
13703
|
+
case "VS Code":
|
|
13704
|
+
return "Code";
|
|
13705
|
+
case "VS Code Insiders":
|
|
13706
|
+
return "Code - Insiders";
|
|
13707
|
+
case "Antigravity":
|
|
13708
|
+
return "Antigravity IDE";
|
|
13709
|
+
default:
|
|
13710
|
+
return ideName;
|
|
13711
|
+
}
|
|
13712
|
+
};
|
|
13713
|
+
getKeybindingsPath = (ideName) => {
|
|
13714
|
+
const dirName = getIDEDirName(ideName);
|
|
13715
|
+
const home = os4.homedir();
|
|
13716
|
+
if (process.platform === "win32") {
|
|
13717
|
+
const appData = process.env.APPDATA;
|
|
13718
|
+
if (!appData) return null;
|
|
13719
|
+
return path20.join(appData, dirName, "User", "keybindings.json");
|
|
13720
|
+
} else if (process.platform === "darwin") {
|
|
13721
|
+
return path20.join(home, "Library", "Application Support", dirName, "User", "keybindings.json");
|
|
13722
|
+
} else {
|
|
13723
|
+
return path20.join(home, ".config", dirName, "User", "keybindings.json");
|
|
13724
|
+
}
|
|
13725
|
+
};
|
|
13726
|
+
parseJsonc = (content) => {
|
|
13727
|
+
const clean = content.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, "$1");
|
|
13728
|
+
return JSON.parse(clean);
|
|
13729
|
+
};
|
|
13730
|
+
hasShiftEnterBinding = (bindings) => {
|
|
13731
|
+
if (!Array.isArray(bindings)) return false;
|
|
13732
|
+
return bindings.some(
|
|
13733
|
+
(b) => b && typeof b.key === "string" && b.key.toLowerCase().replace(/\s+/g, "") === "shift+enter" && b.command === "workbench.action.terminal.sendSequence" && b.args && b.args.text === "\x1B[13;2u" && typeof b.when === "string" && b.when.includes("terminalFocus")
|
|
13734
|
+
);
|
|
13735
|
+
};
|
|
13609
13736
|
getPromoOptions = (ideName) => {
|
|
13610
13737
|
const isStandardVSCode = ideName === "VS Code";
|
|
13611
13738
|
const options = [];
|
|
@@ -13761,6 +13888,7 @@ var init_app = __esm({
|
|
|
13761
13888
|
return fileList;
|
|
13762
13889
|
};
|
|
13763
13890
|
})();
|
|
13891
|
+
cachedShortcut = "\\ + Enter";
|
|
13764
13892
|
}
|
|
13765
13893
|
});
|
|
13766
13894
|
|