fluxflow-cli 3.11.0 → 3.11.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 +33 -11
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -3986,6 +3986,8 @@ var init_theme = __esm({
|
|
|
3986
3986
|
textMuted: "gray",
|
|
3987
3987
|
textDim: "grey",
|
|
3988
3988
|
textInverted: "black",
|
|
3989
|
+
textExclusive: "#B5B8D9",
|
|
3990
|
+
textMutedExclusive: "#D4DEE7",
|
|
3989
3991
|
// Borders
|
|
3990
3992
|
border: "white",
|
|
3991
3993
|
borderMuted: "gray",
|
|
@@ -5708,9 +5710,21 @@ var init_StatusBar = __esm({
|
|
|
5708
5710
|
const timer = setInterval(() => {
|
|
5709
5711
|
const lastTime = lastChunkTimeRef.current;
|
|
5710
5712
|
const timeSinceLast = lastTime > 0 ? Date.now() - lastTime : 0;
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
+
if (lastTime > 0 && timeSinceLast > 1500) {
|
|
5714
|
+
wpsHistoryRef.current = [];
|
|
5713
5715
|
setDisplayedWps(0);
|
|
5716
|
+
} else if (lastTime > 0 && timeSinceLast > 600) {
|
|
5717
|
+
if (wpsHistoryRef.current.length > 0) {
|
|
5718
|
+
wpsHistoryRef.current.shift();
|
|
5719
|
+
}
|
|
5720
|
+
const history = wpsHistoryRef.current;
|
|
5721
|
+
if (history.length > 0) {
|
|
5722
|
+
const sum = history.reduce((acc, val) => acc + val, 0);
|
|
5723
|
+
const avg = Math.round(sum / history.length * 10) / 10;
|
|
5724
|
+
setDisplayedWps(avg);
|
|
5725
|
+
} else {
|
|
5726
|
+
setDisplayedWps(0);
|
|
5727
|
+
}
|
|
5714
5728
|
} else {
|
|
5715
5729
|
const history = wpsHistoryRef.current;
|
|
5716
5730
|
if (history.length > 0) {
|
|
@@ -5804,7 +5818,7 @@ var init_StatusBar = __esm({
|
|
|
5804
5818
|
paddingX: 1,
|
|
5805
5819
|
width: "100%"
|
|
5806
5820
|
},
|
|
5807
|
-
/* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, bold: true }, mode.toUpperCase())), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, italic: true }, truncatePath(process.cwd(), 35)))
|
|
5821
|
+
/* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, bold: true }, mode.toUpperCase())), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, italic: true }, truncatePath(process.cwd(), 35)))),
|
|
5808
5822
|
/* @__PURE__ */ React5.createElement(Box4, null, isProcessing ? /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: dotColor }, "\u25CF"), showTPMEstimate && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, bold: true }, " ", displayedWps, " tps"), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, " \u2503"))) : null, /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text }, formatTokens(tokensTotal), " ", (() => {
|
|
5809
5823
|
const pct = tokens / maxLimit * 100;
|
|
5810
5824
|
const color = pct < 60 ? colors.text : pct < 80 ? colors.warning : colors.danger;
|
|
@@ -17563,7 +17577,7 @@ function App({ args = [] }) {
|
|
|
17563
17577
|
activeStreamingMsgRef.current = null;
|
|
17564
17578
|
}
|
|
17565
17579
|
chunkWordCountRef.current = 0;
|
|
17566
|
-
streamingWordStatsRef.current = { totalWords: 0, startTime: 0, wps: 0 };
|
|
17580
|
+
streamingWordStatsRef.current = { totalWords: 0, startTime: 0, wps: 0, chunks: [] };
|
|
17567
17581
|
};
|
|
17568
17582
|
const startTypewriter = () => {
|
|
17569
17583
|
if (typewriterTickRef.current) {
|
|
@@ -17906,7 +17920,7 @@ function App({ args = [] }) {
|
|
|
17906
17920
|
const [sessionStats, setSessionStats] = useState15({ tokens: 0 });
|
|
17907
17921
|
const [lastChunkTime, setLastChunkTime] = useState15(0);
|
|
17908
17922
|
const chunkWordCountRef = useRef4(0);
|
|
17909
|
-
const streamingWordStatsRef = useRef4({ totalWords: 0, startTime: 0, wps: 0 });
|
|
17923
|
+
const streamingWordStatsRef = useRef4({ totalWords: 0, startTime: 0, wps: 0, chunks: [] });
|
|
17910
17924
|
const [sessionAgentCalls, setSessionAgentCalls] = useState15(0);
|
|
17911
17925
|
const [sessionBackgroundCalls, setSessionBackgroundCalls] = useState15(0);
|
|
17912
17926
|
const [sessionTotalTokens, setSessionTotalTokens] = useState15(0);
|
|
@@ -19973,11 +19987,19 @@ ${timestamp}` };
|
|
|
19973
19987
|
if (!stats.startTime) {
|
|
19974
19988
|
stats.startTime = now;
|
|
19975
19989
|
stats.totalWords = 0;
|
|
19990
|
+
stats.chunks = [];
|
|
19976
19991
|
}
|
|
19977
19992
|
stats.totalWords += wordCount;
|
|
19978
|
-
|
|
19979
|
-
|
|
19980
|
-
|
|
19993
|
+
if (!stats.chunks) stats.chunks = [];
|
|
19994
|
+
stats.chunks.push({ time: now, words: wordCount });
|
|
19995
|
+
const windowMs = 400;
|
|
19996
|
+
const cutoff = now - windowMs;
|
|
19997
|
+
stats.chunks = stats.chunks.filter((c) => c.time >= cutoff);
|
|
19998
|
+
if (stats.chunks.length > 0) {
|
|
19999
|
+
const windowWords = stats.chunks.reduce((acc, c) => acc + c.words, 0);
|
|
20000
|
+
const oldestTime = stats.chunks[0].time;
|
|
20001
|
+
const timeSpanSec = Math.max(0.4, (now - oldestTime) / 1e3);
|
|
20002
|
+
stats.wps = Math.round(windowWords / timeSpanSec * 10) / 10;
|
|
19981
20003
|
}
|
|
19982
20004
|
}
|
|
19983
20005
|
},
|
|
@@ -21619,8 +21641,8 @@ Selection: ${val}`,
|
|
|
21619
21641
|
GlintText_default,
|
|
21620
21642
|
{
|
|
21621
21643
|
text: statusText.trimEnd(),
|
|
21622
|
-
baseColor: colors.text,
|
|
21623
|
-
glintColor: colors.textMuted,
|
|
21644
|
+
baseColor: colors.textExclusive || colors.text,
|
|
21645
|
+
glintColor: colors.textMutedExclusive || colors.textMuted,
|
|
21624
21646
|
speed: 60,
|
|
21625
21647
|
italic: true,
|
|
21626
21648
|
glintWidth: 2,
|
|
@@ -21663,7 +21685,7 @@ Selection: ${val}`,
|
|
|
21663
21685
|
glintColor: colors.textMuted,
|
|
21664
21686
|
glintWidth: 3
|
|
21665
21687
|
}
|
|
21666
|
-
), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted
|
|
21688
|
+
), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, " (", thinkingLevel, ")"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputBorder }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React16.createElement(
|
|
21667
21689
|
Box14,
|
|
21668
21690
|
{
|
|
21669
21691
|
backgroundColor: colors.inputBg,
|