fluxflow-cli 1.7.2 → 1.7.4
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 +29 -13
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -3286,8 +3286,18 @@ Check what's new using \`/changelog\` command.`,
|
|
|
3286
3286
|
setTempKey("");
|
|
3287
3287
|
}
|
|
3288
3288
|
};
|
|
3289
|
+
const lastSavedTimeRef = useRef2(SESSION_START_TIME);
|
|
3289
3290
|
useEffect5(() => {
|
|
3290
3291
|
if (activeView === "exit") {
|
|
3292
|
+
const flush = async () => {
|
|
3293
|
+
const now = Date.now();
|
|
3294
|
+
const deltaSecs = Math.floor((now - lastSavedTimeRef.current) / 1e3);
|
|
3295
|
+
if (deltaSecs >= 1) {
|
|
3296
|
+
await addToUsage("duration", deltaSecs);
|
|
3297
|
+
lastSavedTimeRef.current += deltaSecs * 1e3;
|
|
3298
|
+
}
|
|
3299
|
+
};
|
|
3300
|
+
flush();
|
|
3291
3301
|
const timer = setTimeout(() => {
|
|
3292
3302
|
process.exit(0);
|
|
3293
3303
|
}, 100);
|
|
@@ -3297,9 +3307,14 @@ Check what's new using \`/changelog\` command.`,
|
|
|
3297
3307
|
useEffect5(() => {
|
|
3298
3308
|
const interval = setInterval(async () => {
|
|
3299
3309
|
if (!isInitializing) {
|
|
3300
|
-
|
|
3310
|
+
const now = Date.now();
|
|
3311
|
+
const deltaSecs = Math.floor((now - lastSavedTimeRef.current) / 1e3);
|
|
3312
|
+
if (deltaSecs >= 1) {
|
|
3313
|
+
await addToUsage("duration", deltaSecs);
|
|
3314
|
+
lastSavedTimeRef.current += deltaSecs * 1e3;
|
|
3315
|
+
}
|
|
3301
3316
|
}
|
|
3302
|
-
},
|
|
3317
|
+
}, 3e3);
|
|
3303
3318
|
return () => clearInterval(interval);
|
|
3304
3319
|
}, [isInitializing]);
|
|
3305
3320
|
const COMMANDS = [
|
|
@@ -4261,15 +4276,8 @@ Selection: ${val}`,
|
|
|
4261
4276
|
}
|
|
4262
4277
|
}
|
|
4263
4278
|
)));
|
|
4264
|
-
case "exit":
|
|
4265
|
-
|
|
4266
|
-
const totalTools = sessionToolSuccess + sessionToolFailure;
|
|
4267
|
-
const successRate = totalTools > 0 ? (sessionToolSuccess / totalTools * 100).toFixed(1) : "0.0";
|
|
4268
|
-
const agentActiveMs = sessionApiTime + sessionToolTime;
|
|
4269
|
-
const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
4270
|
-
const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
4271
|
-
return /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: "red", width: 100 }, /* @__PURE__ */ React10.createElement(Box10, { marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan", bold: true }, "Agent powering down. ", /* @__PURE__ */ React10.createElement(Text10, { color: "magenta" }, "Goodbye!"))), /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, chatId)), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, totalTools, " ( ", /* @__PURE__ */ React10.createElement(Text10, { color: "green" }, "\u2713 ", sessionToolSuccess), " ", /* @__PURE__ */ React10.createElement(Text10, { color: "red" }, "x ", sessionToolFailure), " )")), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, successRate, "%"))), /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React10.createElement(Box10, { marginLeft: 2 }, /* @__PURE__ */ React10.createElement(Box10, { width: 18 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue", dimColor: true }, "\xBB API Time:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React10.createElement(Box10, { marginLeft: 2 }, /* @__PURE__ */ React10.createElement(Box10, { width: 18 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue", dimColor: true }, "\xBB Tool Time:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
|
|
4272
|
-
}
|
|
4279
|
+
case "exit":
|
|
4280
|
+
return null;
|
|
4273
4281
|
case "ask":
|
|
4274
4282
|
return /* @__PURE__ */ React10.createElement(Box10, { width: "100%" }, /* @__PURE__ */ React10.createElement(
|
|
4275
4283
|
AskUserModal_default,
|
|
@@ -4513,7 +4521,15 @@ Selection: ${val}`,
|
|
|
4513
4521
|
chatId,
|
|
4514
4522
|
isMemoryEnabled: systemSettings.memory
|
|
4515
4523
|
}
|
|
4516
|
-
)),
|
|
4524
|
+
)), activeView === "exit" && (() => {
|
|
4525
|
+
const wallTimeMs = Date.now() - SESSION_START_TIME;
|
|
4526
|
+
const totalTools = sessionToolSuccess + sessionToolFailure;
|
|
4527
|
+
const successRate = totalTools > 0 ? (sessionToolSuccess / totalTools * 100).toFixed(1) : "0.0";
|
|
4528
|
+
const agentActiveMs = sessionApiTime + sessionToolTime;
|
|
4529
|
+
const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
4530
|
+
const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
4531
|
+
return /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: "red", width: 100, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Box10, { marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan", bold: true }, "Agent powering down. ", /* @__PURE__ */ React10.createElement(Text10, { color: "magenta" }, "Goodbye!"))), /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, chatId)), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, totalTools, " ( ", /* @__PURE__ */ React10.createElement(Text10, { color: "green" }, "\u2713 ", sessionToolSuccess), " ", /* @__PURE__ */ React10.createElement(Text10, { color: "red" }, "x ", sessionToolFailure), " )")), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, successRate, "%")), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, (sessionTotalTokens / 1e3).toFixed(2), "k"))), /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React10.createElement(Box10, null, /* @__PURE__ */ React10.createElement(Box10, { width: 20 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React10.createElement(Box10, { marginLeft: 2 }, /* @__PURE__ */ React10.createElement(Box10, { width: 18 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue", dimColor: true }, "\xBB API Time:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React10.createElement(Box10, { marginLeft: 2 }, /* @__PURE__ */ React10.createElement(Box10, { width: 18 }, /* @__PURE__ */ React10.createElement(Text10, { color: "blue", dimColor: true }, "\xBB Tool Time:")), /* @__PURE__ */ React10.createElement(Text10, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
|
|
4532
|
+
})(), suggestions.length > 0 && (() => {
|
|
4517
4533
|
const windowSize = 5;
|
|
4518
4534
|
const startIdx = Math.max(0, Math.min(selectedIndex - 2, suggestions.length - windowSize));
|
|
4519
4535
|
const visible = suggestions.slice(startIdx, startIdx + windowSize);
|
|
@@ -4565,7 +4581,7 @@ var init_app = __esm({
|
|
|
4565
4581
|
init_setup();
|
|
4566
4582
|
SESSION_START_TIME = Date.now();
|
|
4567
4583
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
4568
|
-
versionFluxflow = "1.7.
|
|
4584
|
+
versionFluxflow = "1.7.4";
|
|
4569
4585
|
updatedOn = "2026-05-03";
|
|
4570
4586
|
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION"), /* @__PURE__ */ React10.createElement(Text10, { marginTop: 1 }, "The agent already finished the task (turn: finish) before your hint was consumed."), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(
|
|
4571
4587
|
CommandMenu,
|