fluxflow-cli 2.16.1 → 2.16.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 +92 -243
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -2110,11 +2110,11 @@ var init_text = __esm({
|
|
|
2110
2110
|
init_paths();
|
|
2111
2111
|
wrapText = (text, width) => {
|
|
2112
2112
|
if (!text) return "";
|
|
2113
|
-
const
|
|
2113
|
+
const ansiRegex = /\x1B\[[0-?]*[ -/]*[@-~]/g;
|
|
2114
2114
|
const sourceLines = text.split("\n");
|
|
2115
2115
|
let finalLines = [];
|
|
2116
2116
|
if (width <= 5) return text;
|
|
2117
|
-
const getVisibleLength = (str) => str.replace(
|
|
2117
|
+
const getVisibleLength = (str) => str.replace(ansiRegex, "").length;
|
|
2118
2118
|
sourceLines.forEach((sLine) => {
|
|
2119
2119
|
const visibleLength = getVisibleLength(sLine);
|
|
2120
2120
|
if (visibleLength <= width) {
|
|
@@ -2135,7 +2135,7 @@ var init_text = __esm({
|
|
|
2135
2135
|
currentLine = indent + token;
|
|
2136
2136
|
currentVisibleLength = getVisibleLength(currentLine);
|
|
2137
2137
|
} else {
|
|
2138
|
-
if (
|
|
2138
|
+
if (ansiRegex.test(token)) {
|
|
2139
2139
|
finalLines.push(token);
|
|
2140
2140
|
currentLine = indent;
|
|
2141
2141
|
currentVisibleLength = getVisibleLength(currentLine);
|
|
@@ -3183,8 +3183,8 @@ var init_MultilineInput = __esm({
|
|
|
3183
3183
|
}
|
|
3184
3184
|
return /* @__PURE__ */ React2.createElement(Text2, { color: "gray", dimColor: true }, emptyText || " ");
|
|
3185
3185
|
}
|
|
3186
|
-
const
|
|
3187
|
-
const parts = text.split(
|
|
3186
|
+
const regex = /(\[Pasted \d+ (?:lines|chars)\])/g;
|
|
3187
|
+
const parts = text.split(regex);
|
|
3188
3188
|
let currentOffset = 0;
|
|
3189
3189
|
const rendered = [];
|
|
3190
3190
|
for (let i = 0; i < parts.length; i++) {
|
|
@@ -3575,7 +3575,7 @@ var init_TerminalBox = __esm({
|
|
|
3575
3575
|
let cursorRow = 0;
|
|
3576
3576
|
let cursorCol = 0;
|
|
3577
3577
|
let currentStyle = "";
|
|
3578
|
-
const
|
|
3578
|
+
const ansiRegex = /\x1b\[([0-9;]*?)([a-zA-Z])/g;
|
|
3579
3579
|
let lastIndex = 0;
|
|
3580
3580
|
let match;
|
|
3581
3581
|
const writeText = (plainText) => {
|
|
@@ -3602,7 +3602,7 @@ var init_TerminalBox = __esm({
|
|
|
3602
3602
|
}
|
|
3603
3603
|
}
|
|
3604
3604
|
};
|
|
3605
|
-
while ((match =
|
|
3605
|
+
while ((match = ansiRegex.exec(text)) !== null) {
|
|
3606
3606
|
writeText(text.substring(lastIndex, match.index));
|
|
3607
3607
|
const params = match[1];
|
|
3608
3608
|
const command2 = match[2];
|
|
@@ -3663,7 +3663,7 @@ var init_TerminalBox = __esm({
|
|
|
3663
3663
|
currentStyle = escSeq;
|
|
3664
3664
|
}
|
|
3665
3665
|
}
|
|
3666
|
-
lastIndex =
|
|
3666
|
+
lastIndex = ansiRegex.lastIndex;
|
|
3667
3667
|
}
|
|
3668
3668
|
writeText(text.substring(lastIndex));
|
|
3669
3669
|
const resultLines = lines.map((line) => {
|
|
@@ -5134,7 +5134,7 @@ var init_exec_command = __esm({
|
|
|
5134
5134
|
const lines = [[]];
|
|
5135
5135
|
let cursorRow = 0;
|
|
5136
5136
|
let cursorCol = 0;
|
|
5137
|
-
const
|
|
5137
|
+
const ansiRegex = /\x1b\[([0-9;]*?)([a-zA-Z])/g;
|
|
5138
5138
|
let lastIndex = 0;
|
|
5139
5139
|
let match;
|
|
5140
5140
|
const writeText = (plainText) => {
|
|
@@ -5161,7 +5161,7 @@ var init_exec_command = __esm({
|
|
|
5161
5161
|
}
|
|
5162
5162
|
}
|
|
5163
5163
|
};
|
|
5164
|
-
while ((match =
|
|
5164
|
+
while ((match = ansiRegex.exec(text)) !== null) {
|
|
5165
5165
|
writeText(text.substring(lastIndex, match.index));
|
|
5166
5166
|
const params = match[1];
|
|
5167
5167
|
const command = match[2];
|
|
@@ -5215,7 +5215,7 @@ var init_exec_command = __esm({
|
|
|
5215
5215
|
cursorCol = 0;
|
|
5216
5216
|
}
|
|
5217
5217
|
}
|
|
5218
|
-
lastIndex =
|
|
5218
|
+
lastIndex = ansiRegex.lastIndex;
|
|
5219
5219
|
}
|
|
5220
5220
|
writeText(text.substring(lastIndex));
|
|
5221
5221
|
const resultLines = lines.map((line) => line.join(""));
|
|
@@ -8905,8 +8905,8 @@ var init_saveSummary = __esm({
|
|
|
8905
8905
|
init_paths();
|
|
8906
8906
|
saveSummary = async (rawArgs, context = {}) => {
|
|
8907
8907
|
const parseArg = (key) => {
|
|
8908
|
-
const
|
|
8909
|
-
const match = rawArgs.match(
|
|
8908
|
+
const regex = new RegExp(`${key}\\s*[:=]\\s*(["'])(.*?)\\1(?=\\s*[,)]|\\s+\\w+\\s*[:=]|$)`, "s");
|
|
8909
|
+
const match = rawArgs.match(regex);
|
|
8910
8910
|
return match ? match[2].trim() : null;
|
|
8911
8911
|
};
|
|
8912
8912
|
const id = parseArg("id");
|
|
@@ -8938,8 +8938,8 @@ var init_addMemScore = __esm({
|
|
|
8938
8938
|
init_paths();
|
|
8939
8939
|
addMemScore = async (rawArgs, context = {}) => {
|
|
8940
8940
|
const parseArg = (key) => {
|
|
8941
|
-
const
|
|
8942
|
-
const match = rawArgs.match(
|
|
8941
|
+
const regex = new RegExp(`${key}\\s*[:=]\\s*(["'])(.*?)\\1(?=\\s*[,)]|\\s+\\w+\\s*[:=]|$)`, "s");
|
|
8942
|
+
const match = rawArgs.match(regex);
|
|
8943
8943
|
return match ? match[2].trim() : null;
|
|
8944
8944
|
};
|
|
8945
8945
|
const id = parseArg("id");
|
|
@@ -10578,14 +10578,14 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
10578
10578
|
}
|
|
10579
10579
|
return result;
|
|
10580
10580
|
};
|
|
10581
|
-
contextSafeReplace = (text,
|
|
10581
|
+
contextSafeReplace = (text, regex, replacement) => {
|
|
10582
10582
|
const toolRegex = /\[\s*tool:functions\.([a-z0-9_]+)\s*\(/gi;
|
|
10583
10583
|
let result = "";
|
|
10584
10584
|
let lastIdx = 0;
|
|
10585
10585
|
let match;
|
|
10586
10586
|
while ((match = toolRegex.exec(text)) !== null) {
|
|
10587
10587
|
const before = text.substring(lastIdx, match.index);
|
|
10588
|
-
result += before.replace(
|
|
10588
|
+
result += before.replace(regex, replacement);
|
|
10589
10589
|
const startIdx = match.index + match[0].length - 1;
|
|
10590
10590
|
let balance = 0;
|
|
10591
10591
|
let inString = null;
|
|
@@ -10631,7 +10631,7 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
10631
10631
|
}
|
|
10632
10632
|
}
|
|
10633
10633
|
if (lastIdx < text.length) {
|
|
10634
|
-
result += text.substring(lastIdx).replace(
|
|
10634
|
+
result += text.substring(lastIdx).replace(regex, replacement);
|
|
10635
10635
|
}
|
|
10636
10636
|
return result;
|
|
10637
10637
|
};
|
|
@@ -11316,7 +11316,7 @@ Provide a consolidated summary of the entire session.`;
|
|
|
11316
11316
|
};
|
|
11317
11317
|
yield { type: "status", content: "[start]" };
|
|
11318
11318
|
yield { type: "status", content: "Gathering Context..." };
|
|
11319
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
11319
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
11320
11320
|
const totalFolders = countFolders(process.cwd());
|
|
11321
11321
|
let dynamicMaxDepth = 12;
|
|
11322
11322
|
if (totalFolders > 4096) dynamicMaxDepth = 1;
|
|
@@ -11804,7 +11804,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
11804
11804
|
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);
|
|
11805
11805
|
const lastUserMsg = contents[contents.length - 1];
|
|
11806
11806
|
if (isBridgeConnected() & loop > 0) {
|
|
11807
|
-
yield { type: "status", content: "
|
|
11807
|
+
yield { type: "status", content: "Verifying..." };
|
|
11808
11808
|
await new Promise((resolve) => setTimeout(resolve, 2500));
|
|
11809
11809
|
const ideCtxJIT = await getIDEContext();
|
|
11810
11810
|
const ideErr = ideCtxJIT ? ideCtxJIT.diagnostics : null;
|
|
@@ -14217,159 +14217,9 @@ var init_witty_phrases = __esm({
|
|
|
14217
14217
|
}
|
|
14218
14218
|
});
|
|
14219
14219
|
|
|
14220
|
-
// node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
14221
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
14222
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
14223
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
14224
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
14225
|
-
const pattern = `${osc}|${csi}`;
|
|
14226
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
14227
|
-
}
|
|
14228
|
-
var init_ansi_regex = __esm({
|
|
14229
|
-
"node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js"() {
|
|
14230
|
-
}
|
|
14231
|
-
});
|
|
14232
|
-
|
|
14233
|
-
// node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
14234
|
-
function stripAnsi3(string) {
|
|
14235
|
-
if (typeof string !== "string") {
|
|
14236
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
14237
|
-
}
|
|
14238
|
-
if (!string.includes("\x1B") && !string.includes("\x9B")) {
|
|
14239
|
-
return string;
|
|
14240
|
-
}
|
|
14241
|
-
return string.replace(regex, "");
|
|
14242
|
-
}
|
|
14243
|
-
var regex;
|
|
14244
|
-
var init_strip_ansi = __esm({
|
|
14245
|
-
"node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js"() {
|
|
14246
|
-
init_ansi_regex();
|
|
14247
|
-
regex = ansiRegex();
|
|
14248
|
-
}
|
|
14249
|
-
});
|
|
14250
|
-
|
|
14251
|
-
// node_modules/.pnpm/ink-gradient@4.0.1_ink@7.1._10eadb2cdb3bd743653644e90a99e776/node_modules/ink-gradient/dist/index.js
|
|
14252
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14253
|
-
import { Children, isValidElement, cloneElement } from "react";
|
|
14254
|
-
import { Box as Box13, Transform, Text as Text14 } from "ink";
|
|
14255
|
-
import gradientString from "gradient-string";
|
|
14256
|
-
var Gradient, dist_default;
|
|
14257
|
-
var init_dist = __esm({
|
|
14258
|
-
"node_modules/.pnpm/ink-gradient@4.0.1_ink@7.1._10eadb2cdb3bd743653644e90a99e776/node_modules/ink-gradient/dist/index.js"() {
|
|
14259
|
-
init_strip_ansi();
|
|
14260
|
-
Gradient = (props) => {
|
|
14261
|
-
if (props.name && props.colors) {
|
|
14262
|
-
throw new Error("The `name` and `colors` props are mutually exclusive");
|
|
14263
|
-
}
|
|
14264
|
-
let gradient3;
|
|
14265
|
-
if (props.name) {
|
|
14266
|
-
gradient3 = gradientString[props.name];
|
|
14267
|
-
} else if (props.colors) {
|
|
14268
|
-
gradient3 = gradientString(props.colors);
|
|
14269
|
-
} else {
|
|
14270
|
-
throw new Error("Either `name` or `colors` prop must be provided");
|
|
14271
|
-
}
|
|
14272
|
-
const applyGradient = (text) => gradient3.multiline(stripAnsi3(text));
|
|
14273
|
-
const containsBoxDescendant = (nodeChildren) => {
|
|
14274
|
-
let hasBox = false;
|
|
14275
|
-
const search = (value) => {
|
|
14276
|
-
Children.forEach(value, (child) => {
|
|
14277
|
-
if (hasBox) {
|
|
14278
|
-
return;
|
|
14279
|
-
}
|
|
14280
|
-
if (!isValidElement(child)) {
|
|
14281
|
-
return;
|
|
14282
|
-
}
|
|
14283
|
-
if (child.type === Box13) {
|
|
14284
|
-
hasBox = true;
|
|
14285
|
-
return;
|
|
14286
|
-
}
|
|
14287
|
-
const childProps = child.props;
|
|
14288
|
-
if (Object.hasOwn(childProps, "children")) {
|
|
14289
|
-
search(childProps["children"]);
|
|
14290
|
-
}
|
|
14291
|
-
});
|
|
14292
|
-
};
|
|
14293
|
-
search(nodeChildren);
|
|
14294
|
-
return hasBox;
|
|
14295
|
-
};
|
|
14296
|
-
const hasChildrenProp = (props2) => Object.hasOwn(props2, "children");
|
|
14297
|
-
const isPlainTextNode = (node) => typeof node === "string" || typeof node === "number";
|
|
14298
|
-
const isNonRenderableChild = (node) => node === null || node === void 0 || typeof node === "boolean";
|
|
14299
|
-
const childrenCount = Children.count(props.children);
|
|
14300
|
-
if (isPlainTextNode(props.children)) {
|
|
14301
|
-
return _jsx(Transform, { transform: applyGradient, children: props.children });
|
|
14302
|
-
}
|
|
14303
|
-
if (childrenCount === 1 && !containsBoxDescendant(props.children)) {
|
|
14304
|
-
return _jsx(Transform, { transform: applyGradient, children: props.children });
|
|
14305
|
-
}
|
|
14306
|
-
const applyGradientToChildren = (children) => {
|
|
14307
|
-
const nodes = [];
|
|
14308
|
-
let bufferedText = "";
|
|
14309
|
-
let nodeIndex = 0;
|
|
14310
|
-
const createKey = () => `gradient-node-${nodeIndex++}`;
|
|
14311
|
-
const pushTransformed = (node, key) => {
|
|
14312
|
-
nodes.push(_jsx(Transform, { transform: applyGradient, children: node }, key));
|
|
14313
|
-
};
|
|
14314
|
-
const flushText = () => {
|
|
14315
|
-
if (bufferedText === "") {
|
|
14316
|
-
return;
|
|
14317
|
-
}
|
|
14318
|
-
const text = bufferedText;
|
|
14319
|
-
bufferedText = "";
|
|
14320
|
-
pushTransformed(_jsx(Text14, { children: text }), createKey());
|
|
14321
|
-
};
|
|
14322
|
-
Children.forEach(children, (child) => {
|
|
14323
|
-
if (isNonRenderableChild(child)) {
|
|
14324
|
-
return;
|
|
14325
|
-
}
|
|
14326
|
-
if (isPlainTextNode(child)) {
|
|
14327
|
-
bufferedText += String(child);
|
|
14328
|
-
return;
|
|
14329
|
-
}
|
|
14330
|
-
flushText();
|
|
14331
|
-
if (isValidElement(child)) {
|
|
14332
|
-
const childKey = child.key ?? createKey();
|
|
14333
|
-
const childProps = child.props;
|
|
14334
|
-
if (child.type === Text14) {
|
|
14335
|
-
pushTransformed(child, childKey);
|
|
14336
|
-
return;
|
|
14337
|
-
}
|
|
14338
|
-
if (child.type === Box13) {
|
|
14339
|
-
if (hasChildrenProp(childProps)) {
|
|
14340
|
-
const childChildren = childProps["children"];
|
|
14341
|
-
nodes.push(cloneElement(child, { key: childKey }, applyGradientToChildren(childChildren)));
|
|
14342
|
-
return;
|
|
14343
|
-
}
|
|
14344
|
-
nodes.push(cloneElement(child, { key: childKey }));
|
|
14345
|
-
return;
|
|
14346
|
-
}
|
|
14347
|
-
if (hasChildrenProp(childProps)) {
|
|
14348
|
-
const childChildren = childProps["children"];
|
|
14349
|
-
if (!containsBoxDescendant(childChildren)) {
|
|
14350
|
-
pushTransformed(child, childKey);
|
|
14351
|
-
return;
|
|
14352
|
-
}
|
|
14353
|
-
nodes.push(cloneElement(child, { key: childKey }, applyGradientToChildren(childChildren)));
|
|
14354
|
-
return;
|
|
14355
|
-
}
|
|
14356
|
-
pushTransformed(child, childKey);
|
|
14357
|
-
return;
|
|
14358
|
-
}
|
|
14359
|
-
nodes.push(child);
|
|
14360
|
-
});
|
|
14361
|
-
flushText();
|
|
14362
|
-
return nodes;
|
|
14363
|
-
};
|
|
14364
|
-
return _jsx(_Fragment, { children: applyGradientToChildren(props.children) });
|
|
14365
|
-
};
|
|
14366
|
-
dist_default = Gradient;
|
|
14367
|
-
}
|
|
14368
|
-
});
|
|
14369
|
-
|
|
14370
14220
|
// src/components/RevertModal.jsx
|
|
14371
14221
|
import React14, { useState as useState13 } from "react";
|
|
14372
|
-
import { Box as
|
|
14222
|
+
import { Box as Box13, Text as Text14, useInput as useInput8 } from "ink";
|
|
14373
14223
|
function RevertModal({ prompts, onSelect, onClose }) {
|
|
14374
14224
|
const [selectedIndex, setSelectedIndex] = useState13(0);
|
|
14375
14225
|
useInput8((input, key) => {
|
|
@@ -14391,23 +14241,23 @@ function RevertModal({ prompts, onSelect, onClose }) {
|
|
|
14391
14241
|
}
|
|
14392
14242
|
}
|
|
14393
14243
|
const visiblePrompts = prompts.slice(startIndex, startIndex + MAX_VISIBLE);
|
|
14394
|
-
return /* @__PURE__ */ React14.createElement(
|
|
14244
|
+
return /* @__PURE__ */ React14.createElement(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "grey", padding: 0, width: "100%" }, /* @__PURE__ */ React14.createElement(Box13, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true }, "CODEBASE TIME TRAVEL: SELECT UNDO POINT")), /* @__PURE__ */ React14.createElement(Box13, { paddingX: 2, marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, null, "Select a prompt to revert the codebase back to the state ", /* @__PURE__ */ React14.createElement(Text14, { bold: true, color: "cyan" }, "immediately before"), " it was executed:")), prompts.length === 0 ? /* @__PURE__ */ React14.createElement(Box13, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React14.createElement(Text14, { italic: true, color: "gray" }, "No prompt checkpoints found for this session.")) : /* @__PURE__ */ React14.createElement(Box13, { flexDirection: "column", width: "100%" }, startIndex > 0 && /* @__PURE__ */ React14.createElement(Box13, { paddingX: 2, marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray" }, "\u25B2 (+", startIndex, " more prompts above)")), visiblePrompts.map((p, index) => {
|
|
14395
14245
|
const actualIndex = startIndex + index;
|
|
14396
14246
|
const isSelected = actualIndex === selectedIndex;
|
|
14397
14247
|
const dateStr = formatDate2(p.timestamp);
|
|
14398
14248
|
const fileCount = p.changes ? p.changes.length : 0;
|
|
14399
14249
|
return /* @__PURE__ */ React14.createElement(
|
|
14400
|
-
|
|
14250
|
+
Box13,
|
|
14401
14251
|
{
|
|
14402
14252
|
key: p.id,
|
|
14403
14253
|
paddingX: 1,
|
|
14404
14254
|
backgroundColor: isSelected ? "#444444" : void 0,
|
|
14405
14255
|
width: "100%"
|
|
14406
14256
|
},
|
|
14407
|
-
/* @__PURE__ */ React14.createElement(
|
|
14257
|
+
/* @__PURE__ */ React14.createElement(Box13, { flexGrow: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: isSelected ? "white" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", '"', formatPromptPreview(p.prompt), '"', /* @__PURE__ */ React14.createElement(Text14, { color: `${isSelected ? "white" : "grey"}`, dimColor: true }, " [", dateStr, " \u2022 ", fileCount, " file(s) changed]")))
|
|
14408
14258
|
);
|
|
14409
|
-
}), startIndex + MAX_VISIBLE < prompts.length && /* @__PURE__ */ React14.createElement(
|
|
14410
|
-
|
|
14259
|
+
}), startIndex + MAX_VISIBLE < prompts.length && /* @__PURE__ */ React14.createElement(Box13, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray" }, "\u25BC (+", prompts.length - (startIndex + MAX_VISIBLE), " more prompts below)"))), /* @__PURE__ */ React14.createElement(
|
|
14260
|
+
Box13,
|
|
14411
14261
|
{
|
|
14412
14262
|
marginTop: 1,
|
|
14413
14263
|
paddingX: 1,
|
|
@@ -14417,7 +14267,7 @@ function RevertModal({ prompts, onSelect, onClose }) {
|
|
|
14417
14267
|
borderBottom: false,
|
|
14418
14268
|
borderColor: "grey"
|
|
14419
14269
|
},
|
|
14420
|
-
/* @__PURE__ */ React14.createElement(
|
|
14270
|
+
/* @__PURE__ */ React14.createElement(Text14, { color: "grey", italic: true }, "\u2191\u2193 navigate \u2022 Enter select undo point \u2022 Esc close")
|
|
14421
14271
|
));
|
|
14422
14272
|
}
|
|
14423
14273
|
function formatPromptPreview(prompt) {
|
|
@@ -14495,7 +14345,7 @@ __export(app_exports, {
|
|
|
14495
14345
|
});
|
|
14496
14346
|
import os4 from "os";
|
|
14497
14347
|
import React15, { useState as useState14, useEffect as useEffect11, useRef as useRef3, useMemo as useMemo2 } from "react";
|
|
14498
|
-
import { Box as
|
|
14348
|
+
import { Box as Box14, Text as Text15, useInput as useInput9, useStdout as useStdout2, Static } from "ink";
|
|
14499
14349
|
import fs22 from "fs-extra";
|
|
14500
14350
|
import path20 from "path";
|
|
14501
14351
|
import { exec as exec2 } from "child_process";
|
|
@@ -17667,14 +17517,14 @@ Selection: ${val}`,
|
|
|
17667
17517
|
const CustomMenuItem = ({ label: label2, isSelected }) => {
|
|
17668
17518
|
const isCancel = label2 === "Cancel" || label2 === "Back" || label2.toLowerCase().includes("exit") || label2.toLowerCase().includes("back");
|
|
17669
17519
|
return /* @__PURE__ */ React15.createElement(
|
|
17670
|
-
|
|
17520
|
+
Box14,
|
|
17671
17521
|
{
|
|
17672
17522
|
marginTop: isCancel ? 1 : 0,
|
|
17673
17523
|
backgroundColor: isSelected ? "#2a2a2a" : void 0,
|
|
17674
17524
|
paddingX: 1,
|
|
17675
17525
|
width: "100%"
|
|
17676
17526
|
},
|
|
17677
|
-
/* @__PURE__ */ React15.createElement(
|
|
17527
|
+
/* @__PURE__ */ React15.createElement(Text15, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label2)
|
|
17678
17528
|
);
|
|
17679
17529
|
};
|
|
17680
17530
|
const renderProgressBar = (label2, current, limit) => {
|
|
@@ -17691,7 +17541,7 @@ Selection: ${val}`,
|
|
|
17691
17541
|
const isTokens = label2.toLowerCase().includes("token");
|
|
17692
17542
|
const displayLimit = shouldClearValue(limit) ? "\u221E" : isTokens ? formatTokens(limit) : limit;
|
|
17693
17543
|
const displayCurrent = isTokens ? formatTokens(current) : current;
|
|
17694
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17544
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "row", paddingLeft: 4, key: label2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, label2, ": ")), /* @__PURE__ */ React15.createElement(Text15, { color: barColor }, barStr), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " ", percent, "% (", displayCurrent, "/", displayLimit, ")"));
|
|
17695
17545
|
};
|
|
17696
17546
|
const renderActiveView = () => {
|
|
17697
17547
|
switch (activeView) {
|
|
@@ -17769,7 +17619,7 @@ Selection: ${val}`,
|
|
|
17769
17619
|
}
|
|
17770
17620
|
);
|
|
17771
17621
|
case "apiTier": {
|
|
17772
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17622
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "SELECT API MODE FOR ", aiProvider.toUpperCase())), /* @__PURE__ */ React15.createElement(
|
|
17773
17623
|
SelectInput2,
|
|
17774
17624
|
{
|
|
17775
17625
|
items: [
|
|
@@ -17799,7 +17649,7 @@ Selection: ${val}`,
|
|
|
17799
17649
|
itemComponent: CustomMenuItem,
|
|
17800
17650
|
indicatorComponent: () => null
|
|
17801
17651
|
}
|
|
17802
|
-
), /* @__PURE__ */ React15.createElement(
|
|
17652
|
+
), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, "(Arrows to select \u2022 Enter to confirm)")));
|
|
17803
17653
|
}
|
|
17804
17654
|
case "resetMode":
|
|
17805
17655
|
return /* @__PURE__ */ React15.createElement(
|
|
@@ -17904,11 +17754,11 @@ Selection: ${val}`,
|
|
|
17904
17754
|
case "providerBudgetSelect": {
|
|
17905
17755
|
const PROVIDERS_LIST = ["Google", "DeepSeek", "NVIDIA", "OpenRouter"];
|
|
17906
17756
|
const anySelected = PROVIDERS_LIST.some((p) => pbsSelected[p]);
|
|
17907
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17757
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", bold: true }, "SELECT PROVIDERS TO SET BUDGETS FOR")), PROVIDERS_LIST.map((prov, i) => {
|
|
17908
17758
|
const isActive = i === pbsCursor;
|
|
17909
17759
|
const isChecked = !!pbsSelected[prov];
|
|
17910
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17911
|
-
}), /* @__PURE__ */ React15.createElement(
|
|
17760
|
+
return /* @__PURE__ */ React15.createElement(Box14, { key: prov, backgroundColor: isActive ? "#2a2a2a" : void 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: isActive ? "white" : "gray", bold: isActive }, isActive ? "\u276F " : " ", /* @__PURE__ */ React15.createElement(Text15, { color: isChecked ? "green" : "gray" }, isChecked ? "\u2611" : "\u2610"), " ", prov, isChecked && quotas.providerBudgets?.[prov]?.agentLimit ? /* @__PURE__ */ React15.createElement(Text15, { color: "cyan" }, " (budget set)") : null));
|
|
17761
|
+
}), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, "\u2191\u2193 Navigate \u2022 Space to toggle \u2022 Enter to confirm \u2022 ESC to go back"), !anySelected && /* @__PURE__ */ React15.createElement(Text15, { color: "yellow", italic: true }, " Select at least one provider to continue")));
|
|
17912
17762
|
}
|
|
17913
17763
|
case "providerBudgetFlow":
|
|
17914
17764
|
return null;
|
|
@@ -17973,7 +17823,7 @@ Selection: ${val}`,
|
|
|
17973
17823
|
const monthName = resetDate.toLocaleString("default", { month: "short" });
|
|
17974
17824
|
resetInfo = `Resets on: ${resetDay}-${monthName}`;
|
|
17975
17825
|
}
|
|
17976
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17826
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "BUDGET LIMIT STATUS"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "[ ESC to Close ]")), limitsNotSet ? /* @__PURE__ */ React15.createElement(Box14, { padding: 1, justifyContent: "center", alignItems: "center", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "LIMITS NOT SET")) : usingProviderBudgets && configuredProviders.length > 0 ? /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", gap: 1, width: "100%" }, configuredProviders.map((prov) => {
|
|
17977
17827
|
const pb = providerBudgetsMap[prov];
|
|
17978
17828
|
const provReqCurrent = dailyUsage?.providerRequests?.[prov] || 0;
|
|
17979
17829
|
let provTokenCurrent = 0;
|
|
@@ -17987,11 +17837,11 @@ Selection: ${val}`,
|
|
|
17987
17837
|
for (const m in monthlyModels) {
|
|
17988
17838
|
provMonthlyCurrent += monthlyModels[m]?.tokens || 0;
|
|
17989
17839
|
}
|
|
17990
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17991
|
-
}), resetInfo ? /* @__PURE__ */ React15.createElement(
|
|
17840
|
+
return /* @__PURE__ */ React15.createElement(Box14, { key: prov, flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 0 }, /* @__PURE__ */ React15.createElement(Text15, { 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"));
|
|
17841
|
+
}), resetInfo ? /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React15.createElement(Text15, { color: "magenta", bold: true }, resetInfo)) : /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React15.createElement(Text15, { color: "blue", bold: true }, "Rolling 30-Day Window"))) : /* @__PURE__ */ React15.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__ */ React15.createElement(Box14, { marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React15.createElement(Text15, { color: "magenta", bold: true }, resetInfo)) : /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React15.createElement(Text15, { color: "blue", bold: true }, "Rolling 30-Day Window"))));
|
|
17992
17842
|
}
|
|
17993
17843
|
case "input":
|
|
17994
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17844
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "DATA CONFIGURATION")), inputConfig?.note && /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, inputConfig.note)), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, flexDirection: "row" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, inputConfig?.label, " "), /* @__PURE__ */ React15.createElement(
|
|
17995
17845
|
TextInput4,
|
|
17996
17846
|
{
|
|
17997
17847
|
value: inputConfig?.value || "",
|
|
@@ -18094,7 +17944,7 @@ Selection: ${val}`,
|
|
|
18094
17944
|
}
|
|
18095
17945
|
}
|
|
18096
17946
|
}
|
|
18097
|
-
)), /* @__PURE__ */ React15.createElement(
|
|
17947
|
+
)), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true, italic: true }, "(Press Enter to confirm selection)")));
|
|
18098
17948
|
case "stats": {
|
|
18099
17949
|
const u = statsMode === "monthly" ? monthlyUsage : dailyUsage;
|
|
18100
17950
|
const trackerTitle = statsMode === "monthly" ? "LAST 30 DAYS USAGE" : "TODAY's USAGE";
|
|
@@ -18104,13 +17954,13 @@ Selection: ${val}`,
|
|
|
18104
17954
|
const imageCreditsLabel = statsMode === "monthly" ? "Image Credits:" : "Image Credits:";
|
|
18105
17955
|
const codeChangesLabel = statsMode === "monthly" ? "Code Changes:" : "Code Changes:";
|
|
18106
17956
|
const toolCallsLabel = statsMode === "monthly" ? "Tool Calls:" : "Tool Calls:";
|
|
18107
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17957
|
+
return /* @__PURE__ */ React15.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__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "30-DAY MODEL TOKEN BREAKDOWN"), !monthlyUsage?.models || Object.keys(monthlyUsage.models).length === 0 ? /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey", italic: true }, "No model token usage recorded in the last 30 days.")) : Object.entries(monthlyUsage.models).map(([provider, models]) => {
|
|
18108
17958
|
const providerTotalTokens = Object.values(models).reduce((sum, m) => sum + (m.tokens || 0), 0);
|
|
18109
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18110
|
-
})) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box15, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text16, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React15.createElement(Box15, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box15, { width: 23 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box15, { width: 23 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box15, { width: 23 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box15, { width: 21 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box15, { width: 23 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, /* @__PURE__ */ React15.createElement(Text16, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text16, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( "), /* @__PURE__ */ React15.createElement(Text16, { color: "green" }, "\u2713 ", sessionToolSuccess), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text16, { color: "yellow" }, "\u2298 ", sessionToolDenied), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text16, { color: "red" }, "\u2715 ", sessionToolFailure), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, " )"))), /* @__PURE__ */ React15.createElement(Box15, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text16, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React15.createElement(Box15, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, timeLabel)), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box15, { width: 23 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box15, { width: 21 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box15, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box15, { width: 23 }, /* @__PURE__ */ React15.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, /* @__PURE__ */ React15.createElement(Text16, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React15.createElement(Text16, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React15.createElement(Box15, null, /* @__PURE__ */ React15.createElement(Box15, { width: 25 }, /* @__PURE__ */ React15.createElement(Text16, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React15.createElement(Text16, { color: "green" }, "\u2713 ", u?.toolSuccess || 0), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text16, { color: "yellow" }, "\u2298 ", u?.toolDenied || 0), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text16, { color: "red" }, "\u2715 ", u?.toolFailure || 0), /* @__PURE__ */ React15.createElement(Text16, { color: "white" }, " )")))), /* @__PURE__ */ React15.createElement(Text16, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
|
|
17959
|
+
return /* @__PURE__ */ React15.createElement(Box14, { key: provider, flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 40 }, /* @__PURE__ */ React15.createElement(Text15, { color: "cyan", bold: true }, provider, ":")), /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, formatTokens(providerTotalTokens))), Object.entries(models).map(([modelName, stats]) => /* @__PURE__ */ React15.createElement(Box14, { key: modelName, flexDirection: "column", marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 36 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "\xBB ", modelName, ":")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(stats.tokens || 0))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 32 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens((stats.tokens || 0) - (stats.candidateTokens || 0)))), (stats.cachedTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 5 }, /* @__PURE__ */ React15.createElement(Box14, { width: 31 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(stats.cachedTokens))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 32 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(stats.candidateTokens || 0))))));
|
|
17960
|
+
})) : /* @__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" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", 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" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2713 ", sessionToolSuccess), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", sessionToolDenied), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2715 ", sessionToolFailure), /* @__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" }, "\u2713 ", u?.toolSuccess || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", u?.toolDenied || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2715 ", 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)"));
|
|
18111
17961
|
}
|
|
18112
17962
|
case "autoExecDanger":
|
|
18113
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17963
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "SECURITY WARNING: YOLO MODE"), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "Turning this ON allows the agent to execute terminal commands automatically without requiring your approval for each step."), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1, color: "white" }, "RISKS INVOLVED:"), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 The agent may execute destructive commands (rm -rf, etc.) by mistake unless specified in sandbox rules."), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Unintended system changes if the agent hallucinates a path or command."), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Reduced control over the agent's step-by-step decision making."), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18114
17964
|
CommandMenu,
|
|
18115
17965
|
{
|
|
18116
17966
|
title: "Confirm Intent",
|
|
@@ -18127,7 +17977,7 @@ Selection: ${val}`,
|
|
|
18127
17977
|
}
|
|
18128
17978
|
)));
|
|
18129
17979
|
case "externalDanger":
|
|
18130
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17980
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "SECURITY WARNING: EXTERNAL WORKSPACE ACCESS"), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "Turning this ON allows the agent to execute tools (Read/Write/Exec) outside of the current active workspace directory."), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1, color: "white" }, "RISKS INVOLVED:"), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Access to sensitive system files (SSH keys, Browser data, etc.)"), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Potential for accidental or malicious deletion of OS-critical files."), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Unauthorized script execution across your entire file system."), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18131
17981
|
CommandMenu,
|
|
18132
17982
|
{
|
|
18133
17983
|
title: "Confirm Intent",
|
|
@@ -18144,7 +17994,7 @@ Selection: ${val}`,
|
|
|
18144
17994
|
}
|
|
18145
17995
|
)));
|
|
18146
17996
|
case "doubleDanger":
|
|
18147
|
-
return /* @__PURE__ */ React15.createElement(
|
|
17997
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "CRITICAL SECURITY WARNING: COMBINED SYSTEM RISK"), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "You are attempting to enable BOTH [YOLO Mode] and [External Workspace Access] simultaneously."), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1, color: "red", bold: true }, "THIS IS NOT RECOMMENDED."), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1, color: "white" }, "THE CRITICAL RISK:"), /* @__PURE__ */ React15.createElement(Text15, null, "The agent will have the power to execute any command across your entire system WITHOUT your approval or supervision."), /* @__PURE__ */ React15.createElement(Text15, { color: "red", italic: true, marginTop: 1 }, "A single hallucination or error could result in full system wipe or data theft."), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18148
17998
|
CommandMenu,
|
|
18149
17999
|
{
|
|
18150
18000
|
title: "Final Confirmation",
|
|
@@ -18185,10 +18035,10 @@ Selection: ${val}`,
|
|
|
18185
18035
|
}
|
|
18186
18036
|
);
|
|
18187
18037
|
case "deleteKey":
|
|
18188
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18038
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1 }, (() => {
|
|
18189
18039
|
const s = emojiSpace(2);
|
|
18190
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18191
|
-
})(), /* @__PURE__ */ React15.createElement(
|
|
18040
|
+
return /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "DANGER: CLEAR CREDENTIALS");
|
|
18041
|
+
})(), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "This will permanently delete all saved API keys in credential cache. You will need to enter it again to use Flux."), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18192
18042
|
CommandMenu,
|
|
18193
18043
|
{
|
|
18194
18044
|
title: "Are you sure?",
|
|
@@ -18212,7 +18062,7 @@ Selection: ${val}`,
|
|
|
18212
18062
|
case "exit":
|
|
18213
18063
|
return null;
|
|
18214
18064
|
case "ask":
|
|
18215
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18065
|
+
return /* @__PURE__ */ React15.createElement(Box14, { width: "100%" }, /* @__PURE__ */ React15.createElement(
|
|
18216
18066
|
AskUserModal_default,
|
|
18217
18067
|
{
|
|
18218
18068
|
question: pendingAsk?.question,
|
|
@@ -18227,7 +18077,7 @@ Selection: ${val}`,
|
|
|
18227
18077
|
}
|
|
18228
18078
|
));
|
|
18229
18079
|
case "revert":
|
|
18230
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18080
|
+
return /* @__PURE__ */ React15.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React15.createElement(
|
|
18231
18081
|
RevertModal,
|
|
18232
18082
|
{
|
|
18233
18083
|
prompts: recentPrompts,
|
|
@@ -18298,7 +18148,7 @@ Selection: ${val}`,
|
|
|
18298
18148
|
}
|
|
18299
18149
|
));
|
|
18300
18150
|
case "resume":
|
|
18301
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18151
|
+
return /* @__PURE__ */ React15.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React15.createElement(
|
|
18302
18152
|
ResumeModal,
|
|
18303
18153
|
{
|
|
18304
18154
|
onSelect: async (id) => {
|
|
@@ -18335,7 +18185,7 @@ Selection: ${val}`,
|
|
|
18335
18185
|
}
|
|
18336
18186
|
));
|
|
18337
18187
|
case "keybindingsPrompt":
|
|
18338
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18188
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "\u2328 CONFIGURE SHIFT+ENTER NEWLINE"), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "To support multi-line inputs with ", /* @__PURE__ */ React15.createElement(Text15, { bold: true, color: "white" }, "Shift + Enter"), " for newline, a terminal sequence keybinding needs to be added to your IDE configuration."), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "Would you like FluxFlow to automatically add this to your ", getIDEName(), " keybindings?"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18339
18189
|
CommandMenu,
|
|
18340
18190
|
{
|
|
18341
18191
|
title: "Add Keybinding?",
|
|
@@ -18354,9 +18204,9 @@ Selection: ${val}`,
|
|
|
18354
18204
|
}
|
|
18355
18205
|
)));
|
|
18356
18206
|
case "memory":
|
|
18357
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18207
|
+
return /* @__PURE__ */ React15.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React15.createElement(MemoryModal, { onClose: () => setActiveView("chat") }));
|
|
18358
18208
|
case "parserDownload":
|
|
18359
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18209
|
+
return /* @__PURE__ */ React15.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React15.createElement(ParserDownloadModal, { onClose: () => setActiveView("settings") }));
|
|
18360
18210
|
case "profile":
|
|
18361
18211
|
return /* @__PURE__ */ React15.createElement(
|
|
18362
18212
|
ProfileForm,
|
|
@@ -18371,7 +18221,7 @@ Selection: ${val}`,
|
|
|
18371
18221
|
}
|
|
18372
18222
|
);
|
|
18373
18223
|
case "resolution":
|
|
18374
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18224
|
+
return /* @__PURE__ */ React15.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React15.createElement(
|
|
18375
18225
|
ResolutionModal,
|
|
18376
18226
|
{
|
|
18377
18227
|
data: resolutionData,
|
|
@@ -18390,7 +18240,7 @@ Selection: ${val}`,
|
|
|
18390
18240
|
}
|
|
18391
18241
|
));
|
|
18392
18242
|
case "approval":
|
|
18393
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18243
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "FILE WRITE PERMISSION"), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "The agent is attempting to modify: ", /* @__PURE__ */ React15.createElement(Text15, { color: "cyan" }, parseArgs(pendingApproval?.args || "{}").path || "Unknown File")), !isBridgeConnected() ? /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, borderStyle: "single", borderColor: "#333", paddingX: 1, flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "--- PROPOSED CONTENT ---"), (() => {
|
|
18394
18244
|
const args2 = parseArgs(pendingApproval?.args || "{}");
|
|
18395
18245
|
const patchPairs = [];
|
|
18396
18246
|
const indices = /* @__PURE__ */ new Set();
|
|
@@ -18416,15 +18266,15 @@ Selection: ${val}`,
|
|
|
18416
18266
|
}
|
|
18417
18267
|
});
|
|
18418
18268
|
if (patchPairs.length > 0) {
|
|
18419
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18269
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, patchPairs.map((pair, idx) => {
|
|
18420
18270
|
const hasOld = pair.replace !== null;
|
|
18421
18271
|
const hasNew = pair.new !== null;
|
|
18422
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18272
|
+
return /* @__PURE__ */ React15.createElement(Box14, { key: idx, flexDirection: "column", marginTop: idx > 0 ? 1 : 0 }, patchPairs.length > 1 && /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "Block ", idx + 1, ":"), hasOld && /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text15, { color: "red", wrap: "anywhere", bold: true }, "- ", pair.replace)), hasNew && /* @__PURE__ */ React15.createElement(Box14, { marginTop: hasOld ? 0 : 0 }, /* @__PURE__ */ React15.createElement(Text15, { color: "green", wrap: "anywhere", bold: true }, "+ ", pair.new.replace(/\[\/n\]?/g, "\\n"))));
|
|
18423
18273
|
}));
|
|
18424
18274
|
}
|
|
18425
18275
|
const newVal = args2.content || args2.ReplacementContent || args2.content_to_add || args2.replacementContent || args2.newContent || null;
|
|
18426
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18427
|
-
})()) : /* @__PURE__ */ React15.createElement(
|
|
18276
|
+
return /* @__PURE__ */ React15.createElement(Text15, { color: "white", wrap: "anywhere" }, (newVal ? newVal.replace(/\[\/n\]?/g, "\\n") : null) || "Updating file content...");
|
|
18277
|
+
})()) : /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "cyan", italic: true }, "\u26A1\uFE0F FluxFlow Companion is active. Review the changes in your editor.")), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18428
18278
|
CommandMenu,
|
|
18429
18279
|
{
|
|
18430
18280
|
title: "Action Required",
|
|
@@ -18506,7 +18356,7 @@ Selection: ${val}`,
|
|
|
18506
18356
|
}
|
|
18507
18357
|
);
|
|
18508
18358
|
case "terminalApproval":
|
|
18509
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18359
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "TERMINAL COMMAND OVERSIGHT"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, null, "Agent requested to run: ", /* @__PURE__ */ React15.createElement(Text15, { color: "yellow", bold: true }, parseArgs(pendingApproval?.args || "{}").command || "Unknown Command"))), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18510
18360
|
CommandMenu,
|
|
18511
18361
|
{
|
|
18512
18362
|
title: "Risk Assessment Required",
|
|
@@ -18522,8 +18372,8 @@ Selection: ${val}`,
|
|
|
18522
18372
|
}
|
|
18523
18373
|
)));
|
|
18524
18374
|
default:
|
|
18525
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18526
|
-
|
|
18375
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "[ ESC to Close ]")), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6 }))), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, null, statusText ? /* @__PURE__ */ React15.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React15.createElement(build_default, null), /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, italic: true }, statusText.trimEnd()), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, activeTime > 0 ? `[${activeTime.toFixed(0)}s]` : "")) : /* @__PURE__ */ React15.createElement(Text15, { color: "white", italic: true }, input.length > 0 && escPressCount ? "Press ESC again to clear input" : hasPasteBlock ? "Press CTRL + O to expand" : "Waiting for input...")), /* @__PURE__ */ React15.createElement(Box14, null, wittyPhrase && /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, wittyPhrase, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, tempModelOverride || activeModel))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React15.createElement(Text15, { color: "#555555" }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React15.createElement(
|
|
18376
|
+
Box14,
|
|
18527
18377
|
{
|
|
18528
18378
|
backgroundColor: "#555555",
|
|
18529
18379
|
paddingX: 1,
|
|
@@ -18531,7 +18381,7 @@ Selection: ${val}`,
|
|
|
18531
18381
|
width: "100%",
|
|
18532
18382
|
flexDirection: "column"
|
|
18533
18383
|
},
|
|
18534
|
-
/* @__PURE__ */ React15.createElement(
|
|
18384
|
+
/* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React15.createElement(Box14, { flexShrink: 0, width: 4 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, isProcessing || isCompressing ? "\u2726 " : " \u276F ")), /* @__PURE__ */ React15.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React15.createElement(Box14, { flexGrow: 1, position: "relative" }, input === "" && /* @__PURE__ */ React15.createElement(Box14, { position: "absolute", paddingLeft: 0 }, activeCommand && !isTerminalFocused ? /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, isTerminalWaitingForInput ? " Terminal is waiting for user input. Press TAB to interact" : " Press TAB to interact with terminal...") : activeCommand && isTerminalFocused ? /* @__PURE__ */ React15.createElement(Text15, { color: "yellow", bold: true }, " [ TERMINAL FOCUSED ] Type to interact, press TAB to exit...") : escPressCount === 1 ? /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, " Press ESC again to ", input.length > 0 ? "clear input" : "revert codebase to checkpoint", "...") : /* @__PURE__ */ React15.createElement(Text15, { 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__ */ React15.createElement(
|
|
18535
18385
|
MultilineInput,
|
|
18536
18386
|
{
|
|
18537
18387
|
key: `input-${inputKey}`,
|
|
@@ -18556,10 +18406,10 @@ Selection: ${val}`,
|
|
|
18556
18406
|
}
|
|
18557
18407
|
}
|
|
18558
18408
|
)))))
|
|
18559
|
-
), /* @__PURE__ */ React15.createElement(
|
|
18409
|
+
), /* @__PURE__ */ React15.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React15.createElement(Text15, { color: "#555555" }, "\u2580".repeat(Math.max(1, terminalSize.columns))))));
|
|
18560
18410
|
}
|
|
18561
18411
|
};
|
|
18562
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18412
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, showBridgePromo ? /* @__PURE__ */ React15.createElement(BridgePromo, { width: stdout?.columns || 80, height: stdout?.rows || 24, selectedIndex: promoSelectedIndex }) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React15.createElement(Static, { key: `static-${clearKey}-${chatId}-${terminalSize.columns}-${terminalSize.rows}`, items: parsedBlocks.completed }, (block) => /* @__PURE__ */ React15.createElement(
|
|
18563
18413
|
BlockItem,
|
|
18564
18414
|
{
|
|
18565
18415
|
key: block.key,
|
|
@@ -18569,7 +18419,7 @@ Selection: ${val}`,
|
|
|
18569
18419
|
aiProvider,
|
|
18570
18420
|
version: versionFluxflow
|
|
18571
18421
|
}
|
|
18572
|
-
))), /* @__PURE__ */ React15.createElement(
|
|
18422
|
+
))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", paddingX: 1, paddingBottom: 1, width: "100%" }, (activeView === "chat" || ["ask", "approval", "terminalApproval"].includes(activeView)) && /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, parsedBlocks.active.map((block) => /* @__PURE__ */ React15.createElement(
|
|
18573
18423
|
BlockItem,
|
|
18574
18424
|
{
|
|
18575
18425
|
key: block.key,
|
|
@@ -18579,7 +18429,7 @@ Selection: ${val}`,
|
|
|
18579
18429
|
aiProvider,
|
|
18580
18430
|
version: versionFluxflow
|
|
18581
18431
|
}
|
|
18582
|
-
)), activeCommand && /* @__PURE__ */ React15.createElement(
|
|
18432
|
+
)), activeCommand && /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(TerminalBox, { command: activeCommand, output: execOutput, isFocused: isTerminalFocused, isPty: isActiveCommandPty, terminalHeight: terminalSize.rows }))), isInitializing ? /* @__PURE__ */ React15.createElement(Box14, { borderStyle: "double", borderColor: "grey", padding: 1, flexShrink: 0 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, "Starting Flux Flow...")) : !apiKey ? /* @__PURE__ */ React15.createElement(Box14, { borderStyle: "round", borderColor: "white", padding: 0, flexDirection: "column", flexShrink: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", bold: true }, "API KEY REQUIRED")), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, flexDirection: "column" }, setupStep === 0 ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, "Select your Preferred Provider:"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
|
|
18583
18433
|
CommandMenu,
|
|
18584
18434
|
{
|
|
18585
18435
|
items: [
|
|
@@ -18593,7 +18443,7 @@ Selection: ${val}`,
|
|
|
18593
18443
|
setSetupStep(1);
|
|
18594
18444
|
}
|
|
18595
18445
|
}
|
|
18596
|
-
))) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
|
|
18446
|
+
))) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Text15, { 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__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", bold: true }, " ", ">", " "), /* @__PURE__ */ React15.createElement(
|
|
18597
18447
|
TextInput4,
|
|
18598
18448
|
{
|
|
18599
18449
|
value: tempKey,
|
|
@@ -18601,7 +18451,7 @@ Selection: ${val}`,
|
|
|
18601
18451
|
onSubmit: handleSetup,
|
|
18602
18452
|
mask: "*"
|
|
18603
18453
|
}
|
|
18604
|
-
)), /* @__PURE__ */ React15.createElement(
|
|
18454
|
+
)), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, "(Press ESC to go back to provider selection)")))), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, setupStep === 0 ? "(Use arrows to select and Enter to confirm)" : "(Press Enter to confirm and initialize)"))) : renderActiveView(), confirmExit && /* @__PURE__ */ React15.createElement(Box14, { borderStyle: "round", borderColor: "white", paddingX: 2, marginY: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "\u{1F534} EXIT CONFIRMATION: "), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, "Press "), /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "CTRL + C"), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " again to exit (", exitCountdown, "s). Press "), /* @__PURE__ */ React15.createElement(Text15, { color: "gray", bold: true }, "ESC"), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " to cancel.")), suggestions.length > 0 && (() => {
|
|
18605
18455
|
const windowSize = 5;
|
|
18606
18456
|
let startIdx = suggestionOffsetRef.current;
|
|
18607
18457
|
if (selectedIndex < startIdx) {
|
|
@@ -18614,13 +18464,13 @@ Selection: ${val}`,
|
|
|
18614
18464
|
const visible = suggestions.slice(startIdx, startIdx + windowSize);
|
|
18615
18465
|
const remaining = suggestions.length - (startIdx + visible.length);
|
|
18616
18466
|
return /* @__PURE__ */ React15.createElement(
|
|
18617
|
-
|
|
18467
|
+
Box14,
|
|
18618
18468
|
{
|
|
18619
18469
|
flexDirection: "column",
|
|
18620
18470
|
width: "100%",
|
|
18621
18471
|
marginBottom: 1
|
|
18622
18472
|
},
|
|
18623
|
-
/* @__PURE__ */ React15.createElement(
|
|
18473
|
+
/* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, suggestions[0]?.cmd?.startsWith("@") ? "FILE SUGGESTIONS" : "COMMAND SUGGESTIONS"), suggestions[0]?.cmd?.startsWith("@") ? /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, "(Use '#Lstart-Lend' to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
|
|
18624
18474
|
let url = "https://aistudio.google.com/billing";
|
|
18625
18475
|
let label2 = "billing";
|
|
18626
18476
|
if (aiProvider === "DeepSeek") {
|
|
@@ -18633,23 +18483,23 @@ Selection: ${val}`,
|
|
|
18633
18483
|
url = "https://build.nvidia.com/settings/api-keys";
|
|
18634
18484
|
label2 = "billing";
|
|
18635
18485
|
}
|
|
18636
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18486
|
+
return /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true, italic: true }, "Paid API Strategy has more models. Configure ", /* @__PURE__ */ React15.createElement(Text15, { color: "cyan", underline: true }, `\x1B]8;;${url}\x07${label2}\x1B]8;;\x07`), " & /settings");
|
|
18637
18487
|
})() : null),
|
|
18638
18488
|
visible.map((s, i) => {
|
|
18639
18489
|
const actualIdx = startIdx + i;
|
|
18640
18490
|
const isActive = actualIdx === selectedIndex;
|
|
18641
18491
|
const isGemmaDisabled = s.cmd === "gemma-4-31b-it" && apiTier !== "Free";
|
|
18642
18492
|
return /* @__PURE__ */ React15.createElement(
|
|
18643
|
-
|
|
18493
|
+
Box14,
|
|
18644
18494
|
{
|
|
18645
18495
|
key: s.cmd,
|
|
18646
18496
|
flexDirection: "row",
|
|
18647
18497
|
backgroundColor: isActive ? "#2a2a2a" : void 0,
|
|
18648
18498
|
paddingX: 1
|
|
18649
18499
|
},
|
|
18650
|
-
/* @__PURE__ */ React15.createElement(
|
|
18651
|
-
/* @__PURE__ */ React15.createElement(
|
|
18652
|
-
|
|
18500
|
+
/* @__PURE__ */ React15.createElement(Box14, { width: 3 }, /* @__PURE__ */ React15.createElement(Text15, { color: isActive ? "white" : "gray", bold: isActive }, isActive ? " \u276F" : " ")),
|
|
18501
|
+
/* @__PURE__ */ React15.createElement(Box14, { width: 55 }, /* @__PURE__ */ React15.createElement(
|
|
18502
|
+
Text15,
|
|
18653
18503
|
{
|
|
18654
18504
|
color: isGemmaDisabled ? "gray" : isActive ? "white" : "grey",
|
|
18655
18505
|
bold: isActive
|
|
@@ -18660,12 +18510,12 @@ Selection: ${val}`,
|
|
|
18660
18510
|
return parts[parts.length - 1];
|
|
18661
18511
|
})() : s.cmd
|
|
18662
18512
|
)),
|
|
18663
|
-
/* @__PURE__ */ React15.createElement(
|
|
18513
|
+
/* @__PURE__ */ React15.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: `${!isActive ? "gray" : "white"}`, italic: true }, s.desc))
|
|
18664
18514
|
);
|
|
18665
18515
|
}),
|
|
18666
|
-
suggestions.length > 5 && /* @__PURE__ */ React15.createElement(
|
|
18516
|
+
suggestions.length > 5 && /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, height: 1 }, remaining > 0 ? /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true, italic: true }, " ... (", remaining, " more commands available)") : /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true, italic: true }, " (End of list)"))
|
|
18667
18517
|
);
|
|
18668
|
-
})(), /* @__PURE__ */ React15.createElement(
|
|
18518
|
+
})(), /* @__PURE__ */ React15.createElement(Box14, { flexShrink: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(
|
|
18669
18519
|
StatusBar_default,
|
|
18670
18520
|
{
|
|
18671
18521
|
mode,
|
|
@@ -18684,7 +18534,7 @@ Selection: ${val}`,
|
|
|
18684
18534
|
const agentActiveMs = sessionApiTime + sessionToolTime;
|
|
18685
18535
|
const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
18686
18536
|
const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
18687
|
-
return /* @__PURE__ */ React15.createElement(
|
|
18537
|
+
return /* @__PURE__ */ React15.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__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { bold: true }, gradient2(["blue", "purple"])("Agent powering down. Goodbye!"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, chatId)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( ", /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2713 ", sessionToolSuccess), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", sessionToolDenied), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2715 ", sessionToolFailure), " )")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, successRate, "%")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Code Changes:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__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: 16 }, /* @__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: 18 }, /* @__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: 20 }, /* @__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: 20 }, /* @__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, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
|
|
18688
18538
|
})())));
|
|
18689
18539
|
}
|
|
18690
18540
|
var shouldClearValue, getPrefilledValue, getIDEName, getIDEDirName, getKeybindingsPath, parseJsonc, hasShiftEnterBinding, getPromoOptions, BridgePromo, SESSION_START_TIME, CHANGELOG_URL, DOCS_URL, linesAdded, linesRemoved, packageJsonPath, packageJson, versionFluxflow, updatedOn, ResolutionModal, parseAgentText, getProjectFiles, cachedShortcut;
|
|
@@ -18709,7 +18559,6 @@ var init_app = __esm({
|
|
|
18709
18559
|
init_revert();
|
|
18710
18560
|
init_gemini_quotes();
|
|
18711
18561
|
init_witty_phrases();
|
|
18712
|
-
init_dist();
|
|
18713
18562
|
init_RevertModal();
|
|
18714
18563
|
init_usage();
|
|
18715
18564
|
init_TerminalBox();
|
|
@@ -18803,7 +18652,7 @@ var init_app = __esm({
|
|
|
18803
18652
|
const ideName = getIDEName();
|
|
18804
18653
|
const options = getPromoOptions(ideName);
|
|
18805
18654
|
return /* @__PURE__ */ React15.createElement(
|
|
18806
|
-
|
|
18655
|
+
Box14,
|
|
18807
18656
|
{
|
|
18808
18657
|
flexDirection: "column",
|
|
18809
18658
|
alignItems: "center",
|
|
@@ -18811,8 +18660,8 @@ var init_app = __esm({
|
|
|
18811
18660
|
width,
|
|
18812
18661
|
height
|
|
18813
18662
|
},
|
|
18814
|
-
/* @__PURE__ */ React15.createElement(
|
|
18815
|
-
/* @__PURE__ */ React15.createElement(
|
|
18663
|
+
/* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React15.createElement(Text15, null, getFluxLogo(versionFluxflow))),
|
|
18664
|
+
/* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "double", borderColor: "grey", paddingX: 3, paddingY: 1, width: Math.min(80, width - 4) }, /* @__PURE__ */ React15.createElement(Text15, { bold: true, color: "white", textAlign: "center" }, "\u{1F680} UPGRADE YOUR WORKFLOW"), /* @__PURE__ */ React15.createElement(Box14, { marginY: 1, flexDirection: "column", alignItems: "left" }, /* @__PURE__ */ React15.createElement(Text15, null, "You're in ", /* @__PURE__ */ React15.createElement(Text15, { bold: true, color: "cyan" }, ideName), ", but the ", /* @__PURE__ */ React15.createElement(Text15, { bold: true, color: "white" }, "FluxFlow-CLI Companion"), " is not installed."), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Real-time IDE context & Error Resolution"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Auto-open files created by agent"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Native DIFFing for AI edits"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Direct IDE context sharing"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Surgical Diagnostic Sync"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Native Right-Click \u276F Chat integration"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Live Status in IDE"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " \u2705 Clickable terminal-to-code links"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, options.map((opt, i) => /* @__PURE__ */ React15.createElement(Box14, { key: i }, /* @__PURE__ */ React15.createElement(Text15, { color: selectedIndex === i ? "yellow" : "white", bold: selectedIndex === i }, selectedIndex === i ? " \u276F " : " ", opt.label)))), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React15.createElement(Text15, { dimColor: true, italic: true }, "(Use arrows to navigate, Enter to select)")))
|
|
18816
18665
|
);
|
|
18817
18666
|
};
|
|
18818
18667
|
SESSION_START_TIME = Date.now();
|
|
@@ -18824,7 +18673,7 @@ var init_app = __esm({
|
|
|
18824
18673
|
packageJson = JSON.parse(fs22.readFileSync(packageJsonPath, "utf8"));
|
|
18825
18674
|
versionFluxflow = packageJson.version;
|
|
18826
18675
|
updatedOn = packageJson.date || "2026-05-20";
|
|
18827
|
-
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React15.createElement(
|
|
18676
|
+
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", padding: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, data.startsWith("/btw") ? "QUESTION" : "STEERING HINT", " RESOLUTION")), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, null, "The agent already finished the task before your ", data.startsWith("/btw") ? "question" : "hint", " was consumed.")), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, backgroundColor: "#222", paddingX: 2, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { italic: true, color: "gray" }, '"', data.replace("/btw", "").trim(), '"')), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "How would you like to proceed?")), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 0 }, /* @__PURE__ */ React15.createElement(
|
|
18828
18677
|
CommandMenu,
|
|
18829
18678
|
{
|
|
18830
18679
|
title: "Select Action",
|
|
@@ -19097,7 +18946,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
19097
18946
|
const promptPackageManager = async () => {
|
|
19098
18947
|
const React17 = (await import("react")).default;
|
|
19099
18948
|
const { useState: useState15 } = React17;
|
|
19100
|
-
const { render: render2, Box:
|
|
18949
|
+
const { render: render2, Box: Box15, Text: Text16 } = await import("ink");
|
|
19101
18950
|
const SelectInput3 = (await import("ink-select-input")).default;
|
|
19102
18951
|
const TextInput5 = (await import("ink-text-input")).default;
|
|
19103
18952
|
return new Promise((resolve) => {
|
|
@@ -19109,7 +18958,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
19109
18958
|
{ label: "Custom Command", value: "custom" }
|
|
19110
18959
|
];
|
|
19111
18960
|
const CustomItem2 = ({ label: label2, isSelected }) => {
|
|
19112
|
-
return /* @__PURE__ */ React17.createElement(
|
|
18961
|
+
return /* @__PURE__ */ React17.createElement(Box15, { width: "100%" }, /* @__PURE__ */ React17.createElement(Text16, { bold: isSelected }, "\u2514\u2500 ", isSelected ? "\x1B[32m\u25CF\x1B[0m" : "\u25CB", " ", label2));
|
|
19113
18962
|
};
|
|
19114
18963
|
let unmountFn;
|
|
19115
18964
|
const PromptComponent = () => {
|
|
@@ -19126,16 +18975,16 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
19126
18975
|
cleanupAndResolve({ manager: "custom", customCommand: value });
|
|
19127
18976
|
};
|
|
19128
18977
|
if (step === "custom") {
|
|
19129
|
-
return /* @__PURE__ */ React17.createElement(
|
|
18978
|
+
return /* @__PURE__ */ React17.createElement(Box15, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React17.createElement(Box15, { marginBottom: 1 }, /* @__PURE__ */ React17.createElement(Text16, { color: "magenta", bold: true }, "\u{1F527} Enter custom update command:")), /* @__PURE__ */ React17.createElement(Box15, { flexDirection: "row" }, /* @__PURE__ */ React17.createElement(Text16, { color: "cyan", bold: true }, " \u276F "), /* @__PURE__ */ React17.createElement(
|
|
19130
18979
|
TextInput5,
|
|
19131
18980
|
{
|
|
19132
18981
|
value: customCommand2,
|
|
19133
18982
|
onChange: setCustomCommand,
|
|
19134
18983
|
onSubmit: handleCustomSubmit
|
|
19135
18984
|
}
|
|
19136
|
-
)), /* @__PURE__ */ React17.createElement(
|
|
18985
|
+
)), /* @__PURE__ */ React17.createElement(Box15, { marginTop: 1 }, /* @__PURE__ */ React17.createElement(Text16, { color: "gray", dimColor: true, italic: true }, " (Press Enter to confirm)")));
|
|
19137
18986
|
}
|
|
19138
|
-
return /* @__PURE__ */ React17.createElement(
|
|
18987
|
+
return /* @__PURE__ */ React17.createElement(Box15, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React17.createElement(Box15, { marginBottom: 1 }, /* @__PURE__ */ React17.createElement(Text16, { color: "magenta", bold: true }, "\u{1F4E6} Select a package manager for the update:")), /* @__PURE__ */ React17.createElement(
|
|
19139
18988
|
SelectInput3,
|
|
19140
18989
|
{
|
|
19141
18990
|
items,
|