fluxflow-cli 3.4.1 → 3.4.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 +10 -6
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -11676,10 +11676,6 @@ var init_ai = __esm({
|
|
|
11676
11676
|
}
|
|
11677
11677
|
};
|
|
11678
11678
|
runJanitorTask = async (settings, agentText, fullAgentTextRaw, history, callbacks = {}) => {
|
|
11679
|
-
if (process.stdout.isTTY) {
|
|
11680
|
-
process.stdout.write("\x1B]0;FluxFlow | Idle\x07");
|
|
11681
|
-
process.stdout.write("\x1B]633;P;TerminalTitle=FluxFlow | Idle\x07");
|
|
11682
|
-
}
|
|
11683
11679
|
const USER_CONTEXT_LENGTH = 4 * (1024 * 2);
|
|
11684
11680
|
const AGENT_CONTEXT_LENGTH = 4 * (1024 * 8);
|
|
11685
11681
|
const { onStatus, onMemoryUpdated, onBackgroundIncrement } = callbacks;
|
|
@@ -11809,6 +11805,14 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
11809
11805
|
return { iterator: iterator2, firstResult: firstResult2 };
|
|
11810
11806
|
}
|
|
11811
11807
|
})();
|
|
11808
|
+
if (process.stdout.isTTY) {
|
|
11809
|
+
const historyIndex = await loadHistory();
|
|
11810
|
+
const chatData = historyIndex[chatId];
|
|
11811
|
+
const chatName = chatData?.name || "";
|
|
11812
|
+
const title = chatName && !chatName.startsWith("flow-") && !chatName.startsWith("Session ") ? chatName : "FluxFlow | Idle";
|
|
11813
|
+
process.stdout.write(`\x1B]0;${title}\x07`);
|
|
11814
|
+
process.stdout.write(`\x1B]633;P;TerminalTitle=${title}\x07`);
|
|
11815
|
+
}
|
|
11812
11816
|
const { iterator, firstResult } = await Promise.race([streamPromise, timeoutPromise]);
|
|
11813
11817
|
let { value: firstChunk, done: firstDone } = firstResult;
|
|
11814
11818
|
if (!firstDone && firstChunk) {
|
|
@@ -19232,10 +19236,10 @@ Selection: ${val}`,
|
|
|
19232
19236
|
const parts = chunkText.split(/<\/(think|thought)>/gi);
|
|
19233
19237
|
const thinkPart = parts[0] || "";
|
|
19234
19238
|
const agentPart = parts.slice(2).join("").replace(/<\/?(think|thought)>/gi, "");
|
|
19239
|
+
flushTypewriterNow();
|
|
19235
19240
|
activeStreamingMsgRef.current.text = flattenString(activeStreamingMsgRef.current.text + thinkPart);
|
|
19236
19241
|
const startTime = activeStreamingMsgRef.current.startTime || Date.now();
|
|
19237
19242
|
activeStreamingMsgRef.current.duration = Date.now() - startTime;
|
|
19238
|
-
flushTypewriterNow();
|
|
19239
19243
|
commitActiveStreamingMessage();
|
|
19240
19244
|
inThinkMode = false;
|
|
19241
19245
|
currentAgentId = "agent-" + Date.now();
|
|
@@ -19244,6 +19248,7 @@ Selection: ${val}`,
|
|
|
19244
19248
|
continue;
|
|
19245
19249
|
}
|
|
19246
19250
|
if (inThinkMode && activeStreamingMsgRef.current?.role === "think") {
|
|
19251
|
+
flushTypewriterNow();
|
|
19247
19252
|
const newText = activeStreamingMsgRef.current.text + chunkText;
|
|
19248
19253
|
if (newText.toLowerCase().includes("</think>")) {
|
|
19249
19254
|
const parts = newText.split(/<\/think>/gi);
|
|
@@ -19252,7 +19257,6 @@ Selection: ${val}`,
|
|
|
19252
19257
|
activeStreamingMsgRef.current.text = flattenString(thinkPart);
|
|
19253
19258
|
const startTime = activeStreamingMsgRef.current.startTime || Date.now();
|
|
19254
19259
|
activeStreamingMsgRef.current.duration = Date.now() - startTime;
|
|
19255
|
-
flushTypewriterNow();
|
|
19256
19260
|
commitActiveStreamingMessage();
|
|
19257
19261
|
inThinkMode = false;
|
|
19258
19262
|
currentAgentId = "agent-" + Date.now();
|