fluxflow-cli 3.1.6 → 3.1.8
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 +171 -21
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -3986,7 +3986,7 @@ var init_terminal = __esm({
|
|
|
3986
3986
|
}
|
|
3987
3987
|
return " ".repeat(baseSpaces);
|
|
3988
3988
|
};
|
|
3989
|
-
getFluxLogo = (version = "
|
|
3989
|
+
getFluxLogo = (version = "...", provider = "Loading...") => {
|
|
3990
3990
|
const quote = STARTUP_QUOTES[Math.floor(Math.random() * STARTUP_QUOTES.length)];
|
|
3991
3991
|
const art = [
|
|
3992
3992
|
" \u2588\u2588\u2588 ",
|
|
@@ -6549,7 +6549,7 @@ Check these first; These Files > Training Data. Safety rules apply
|
|
|
6549
6549
|
const projectContextBlock = cachedProjectContextBlock;
|
|
6550
6550
|
return `${nameStr}${nicknameStr}${userInstrStr}=== SYSTEM PROMPT ===
|
|
6551
6551
|
Identity: Flux Flow (by Kushal Roy Chowdhury). ${mode === "Flux" ? "Sassy" : "Conversational, Sassy, Friendly, Humorous, Sarcastic"}, CLI Agent
|
|
6552
|
-
Mode: ${mode}${thinkingLevel !== "Fast" ? "
|
|
6552
|
+
Mode: ${mode}${thinkingLevel !== "Fast" ? "" : ""}. ${mode === "Flux" ? "Logical, Highly Detailed, Task-Driven. Prioritizes scalable file/folder structures, modular architecture, clean code abstractions, step-by-step execution. Industry standard latest coding practices/libraries, clean code, Double Check Imports, Run tests where needed to verify" : "Concise"}
|
|
6553
6553
|
|
|
6554
6554
|
-- MARKERS --
|
|
6555
6555
|
- TOOL SYSTEM: [TOOL RESULT]
|
|
@@ -10096,24 +10096,35 @@ async function copyWorkspaceFiles(destDir, manifest) {
|
|
|
10096
10096
|
});
|
|
10097
10097
|
}
|
|
10098
10098
|
}
|
|
10099
|
-
async function restoreSnapshotDir(srcDir, destDir) {
|
|
10099
|
+
async function restoreSnapshotDir(srcDir, destDir, stats = null, baseDir = null) {
|
|
10100
10100
|
if (!await fs21.pathExists(srcDir)) return;
|
|
10101
|
+
if (!baseDir) baseDir = srcDir;
|
|
10101
10102
|
const entries = await fs21.readdir(srcDir, { withFileTypes: true }).catch(() => []);
|
|
10102
10103
|
for (const entry of entries) {
|
|
10103
10104
|
const srcPath = path20.join(srcDir, entry.name);
|
|
10104
10105
|
const destPath = path20.join(destDir, entry.name);
|
|
10105
10106
|
if (entry.isDirectory()) {
|
|
10106
|
-
await restoreSnapshotDir(srcPath, destPath);
|
|
10107
|
+
await restoreSnapshotDir(srcPath, destPath, stats, baseDir);
|
|
10107
10108
|
} else {
|
|
10108
|
-
|
|
10109
|
+
const relPath = path20.relative(baseDir, srcPath).replace(/\\/g, "/");
|
|
10110
|
+
const existed = await fs21.pathExists(destPath);
|
|
10111
|
+
if (existed) {
|
|
10109
10112
|
await fs21.chmod(destPath, 438).catch(() => {
|
|
10110
10113
|
});
|
|
10111
10114
|
}
|
|
10112
10115
|
await fs21.ensureDir(path20.dirname(destPath));
|
|
10113
|
-
await fs21.copyFile(srcPath, destPath).catch(() =>
|
|
10114
|
-
});
|
|
10116
|
+
const ok = await fs21.copyFile(srcPath, destPath).then(() => true).catch(() => false);
|
|
10115
10117
|
await fs21.chmod(destPath, 438).catch(() => {
|
|
10116
10118
|
});
|
|
10119
|
+
if (stats) {
|
|
10120
|
+
if (!ok) {
|
|
10121
|
+
stats.failed.push(relPath);
|
|
10122
|
+
} else if (existed) {
|
|
10123
|
+
stats.replaced++;
|
|
10124
|
+
} else {
|
|
10125
|
+
stats.restored++;
|
|
10126
|
+
}
|
|
10127
|
+
}
|
|
10117
10128
|
}
|
|
10118
10129
|
}
|
|
10119
10130
|
}
|
|
@@ -10230,6 +10241,7 @@ var init_advanceRevert = __esm({
|
|
|
10230
10241
|
const targetIdx = checkpoints.findIndex((c) => c.id === checkpointId);
|
|
10231
10242
|
if (targetIdx === -1) throw new Error(`Checkpoint [${checkpointId}] not found.`);
|
|
10232
10243
|
const snapshotsDir = path20.join(DATA_DIR, "snapshots", chatId);
|
|
10244
|
+
const stats = { restored: 0, replaced: 0, failed: [] };
|
|
10233
10245
|
const currentFiles = await scanWorkspace(process.cwd());
|
|
10234
10246
|
for (const relPath of Object.keys(currentFiles)) {
|
|
10235
10247
|
const fullPath = path20.join(process.cwd(), relPath);
|
|
@@ -10239,11 +10251,11 @@ var init_advanceRevert = __esm({
|
|
|
10239
10251
|
});
|
|
10240
10252
|
}
|
|
10241
10253
|
const initialDir = path20.join(snapshotsDir, "initial");
|
|
10242
|
-
await restoreSnapshotDir(initialDir, process.cwd());
|
|
10254
|
+
await restoreSnapshotDir(initialDir, process.cwd(), stats, initialDir);
|
|
10243
10255
|
for (let i = 1; i <= targetIdx; i++) {
|
|
10244
10256
|
const cp = checkpoints[i];
|
|
10245
10257
|
const turnDir = path20.join(snapshotsDir, cp.id);
|
|
10246
|
-
await restoreSnapshotDir(turnDir, process.cwd());
|
|
10258
|
+
await restoreSnapshotDir(turnDir, process.cwd(), stats, turnDir);
|
|
10247
10259
|
if (cp.deletedFiles && cp.deletedFiles.length > 0) {
|
|
10248
10260
|
for (const delFile of cp.deletedFiles) {
|
|
10249
10261
|
const fullPath = path20.join(process.cwd(), delFile);
|
|
@@ -10257,7 +10269,7 @@ var init_advanceRevert = __esm({
|
|
|
10257
10269
|
session.checkpoints = checkpoints.slice(0, targetIdx + 1);
|
|
10258
10270
|
session.currentManifest = await scanWorkspace(process.cwd());
|
|
10259
10271
|
writeEncryptedJson(LEDGER_ADVANCE_FILE, ledger);
|
|
10260
|
-
return
|
|
10272
|
+
return { checkpointId, stats };
|
|
10261
10273
|
} catch (err) {
|
|
10262
10274
|
throw new Error(`Rollback failed: ${err.message}`);
|
|
10263
10275
|
}
|
|
@@ -10351,8 +10363,28 @@ Tools Used: ${toolsStr}
|
|
|
10351
10363
|
return "ERROR: Missing required parameter 'id' for forceRevert.";
|
|
10352
10364
|
}
|
|
10353
10365
|
try {
|
|
10354
|
-
await AdvanceRevertManager.rollbackToCheckpoint(chatId, id);
|
|
10355
|
-
|
|
10366
|
+
const result = await AdvanceRevertManager.rollbackToCheckpoint(chatId, id);
|
|
10367
|
+
const { checkpointId, stats } = result;
|
|
10368
|
+
const totalFiles = stats.restored + stats.replaced + stats.failed.length;
|
|
10369
|
+
let output = `SUCCESS: Repository rolled back to checkpoint [${checkpointId}].
|
|
10370
|
+
|
|
10371
|
+
`;
|
|
10372
|
+
output += `Stats:
|
|
10373
|
+
`;
|
|
10374
|
+
output += ` Restored : ${stats.restored} file${stats.restored !== 1 ? "s" : ""} (new to workspace)
|
|
10375
|
+
`;
|
|
10376
|
+
output += ` Replaced : ${stats.replaced} file${stats.replaced !== 1 ? "s" : ""} (overwritten)
|
|
10377
|
+
`;
|
|
10378
|
+
output += ` Failed : ${stats.failed.length} file${stats.failed.length !== 1 ? "s" : ""}`;
|
|
10379
|
+
if (stats.failed.length > 0) {
|
|
10380
|
+
output += `
|
|
10381
|
+
${stats.failed.join("\n ")}`;
|
|
10382
|
+
}
|
|
10383
|
+
output += `
|
|
10384
|
+
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500-
|
|
10385
|
+
`;
|
|
10386
|
+
output += ` Total : ${totalFiles} file${totalFiles !== 1 ? "s" : ""} processed`;
|
|
10387
|
+
return output;
|
|
10356
10388
|
} catch (err) {
|
|
10357
10389
|
return `ERROR: ${err.message}`;
|
|
10358
10390
|
}
|
|
@@ -10600,7 +10632,7 @@ __export(ai_exports, {
|
|
|
10600
10632
|
import { GoogleGenAI, ThinkingLevel, HarmBlockThreshold, HarmCategory } from "@google/genai";
|
|
10601
10633
|
import path21, { normalize } from "path";
|
|
10602
10634
|
import fs22 from "fs";
|
|
10603
|
-
var client, globalSettings, colorMainWords, withRetry, TERMINATION_SIGNAL, MULTIMODAL_MODELS, isModelMultimodal, getCleanGroupedLength, stripAnsi2, fetchWithBackoff, getDeepSeekStream, getNVIDIAStream, getOpenRouterStream, signalTermination, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, translateKimiToolCalls, detectToolCalls, initAI, generateSimpleContent, consolidatePastMemories, compressHistory, deleteChatSummary, getAIStream, runSubagent;
|
|
10635
|
+
var client, globalSettings, colorMainWords, withRetry, TERMINATION_SIGNAL, MULTIMODAL_MODELS, isModelMultimodal, getCleanGroupedLength, stripAnsi2, fetchWithBackoff, getDeepSeekStream, getNVIDIAStream, wrapNvidiaStreamWithQueueDepth, getOpenRouterStream, signalTermination, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, translateKimiToolCalls, detectToolCalls, initAI, generateSimpleContent, consolidatePastMemories, compressHistory, deleteChatSummary, getAIStream, runSubagent;
|
|
10604
10636
|
var init_ai = __esm({
|
|
10605
10637
|
async "src/utils/ai.js"() {
|
|
10606
10638
|
await init_prompts();
|
|
@@ -10622,7 +10654,7 @@ var init_ai = __esm({
|
|
|
10622
10654
|
globalSettings = {};
|
|
10623
10655
|
colorMainWords = (label) => {
|
|
10624
10656
|
if (!label) return label;
|
|
10625
|
-
return label.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻•🛇])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Auto-Read|List|Generated|Written|Searched|Get Map|Write Canceled|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Started Generalist|Called Generalist|Unsupported Modality|Awaiting|Cancelled|Aligning Moon Phase|Contemplating Existence|Staring At Void|Rollback Checked|Emergency Rollback|Delaying Professionally|Negotiating With Electrons|Touching Grass (virtually)|Panicking Softly|Rethinking Career Choices|Loading Cat Videos|Giving Up Entirely|Summoning Braincell #2|Pretending To Be Busy|Waiting For Motivation DLC|Rotating Internal Screaming|Downloading More RAM|Feeding The Hamsters|Gaslighting Scheduler|Performing Dramatic Pause|Buffering Social Energy|Calculating Regret|Reading Terms And Conditions|Becoming Sentient Briefly|Contacting Ancestors)\b/ig, (match, ansiBefore, icon, ansiAfter, word) => {
|
|
10657
|
+
return label.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻•🛇])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Auto-Read|List|Generated|Written|Searched|Get Map|Write Canceled|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Started Generalist|Called Generalist|Unsupported Modality|Awaiting|Cancelled|Aligning Moon Phase|Contemplating Existence|Staring At Void|Rollback Point Checked|Emergency Rollback Failed|Emergency Rollback|Delaying Professionally|Negotiating With Electrons|Touching Grass (virtually)|Panicking Softly|Rethinking Career Choices|Loading Cat Videos|Giving Up Entirely|Summoning Braincell #2|Pretending To Be Busy|Waiting For Motivation DLC|Rotating Internal Screaming|Downloading More RAM|Feeding The Hamsters|Gaslighting Scheduler|Performing Dramatic Pause|Buffering Social Energy|Calculating Regret|Reading Terms And Conditions|Becoming Sentient Briefly|Contacting Ancestors)\b/ig, (match, ansiBefore, icon, ansiAfter, word) => {
|
|
10626
10658
|
return `${ansiBefore || ""}${icon}${ansiAfter || ""} \x1B[95m${word}\x1B[0m`;
|
|
10627
10659
|
});
|
|
10628
10660
|
};
|
|
@@ -11049,6 +11081,97 @@ var init_ai = __esm({
|
|
|
11049
11081
|
}
|
|
11050
11082
|
}
|
|
11051
11083
|
};
|
|
11084
|
+
wrapNvidiaStreamWithQueueDepth = async function* (stream, modelName) {
|
|
11085
|
+
const queue = [];
|
|
11086
|
+
let resolveNext = null;
|
|
11087
|
+
let done = false;
|
|
11088
|
+
let error = null;
|
|
11089
|
+
const push = (item) => {
|
|
11090
|
+
queue.push(item);
|
|
11091
|
+
if (resolveNext) {
|
|
11092
|
+
const resolve = resolveNext;
|
|
11093
|
+
resolveNext = null;
|
|
11094
|
+
resolve();
|
|
11095
|
+
}
|
|
11096
|
+
};
|
|
11097
|
+
const cleanModelId = modelName.split("/").pop();
|
|
11098
|
+
const pollUrl = `https://api.ngc.nvidia.com/v2/predict/queues/models/qc69jvmznzxy/${cleanModelId}`;
|
|
11099
|
+
let isStreamingStarted = false;
|
|
11100
|
+
let pollInterval = null;
|
|
11101
|
+
const poll = async () => {
|
|
11102
|
+
try {
|
|
11103
|
+
const res = await fetch(pollUrl);
|
|
11104
|
+
if (res.ok) {
|
|
11105
|
+
const data = await res.json();
|
|
11106
|
+
if (data && data.queues && data.queues[0] && typeof data.queues[0].queueDepth === "number") {
|
|
11107
|
+
const depth = data.queues[0].queueDepth;
|
|
11108
|
+
if (!isStreamingStarted) {
|
|
11109
|
+
push({ value: { type: "status", content: `Queue Depth ${depth}...` }, done: false });
|
|
11110
|
+
}
|
|
11111
|
+
}
|
|
11112
|
+
}
|
|
11113
|
+
} catch (e) {
|
|
11114
|
+
}
|
|
11115
|
+
};
|
|
11116
|
+
poll();
|
|
11117
|
+
pollInterval = setInterval(poll, 5e3);
|
|
11118
|
+
(async () => {
|
|
11119
|
+
try {
|
|
11120
|
+
const iterator = stream[Symbol.asyncIterator]();
|
|
11121
|
+
while (true) {
|
|
11122
|
+
const { value, done: streamDone } = await iterator.next();
|
|
11123
|
+
if (streamDone) {
|
|
11124
|
+
break;
|
|
11125
|
+
}
|
|
11126
|
+
isStreamingStarted = true;
|
|
11127
|
+
if (pollInterval) {
|
|
11128
|
+
clearInterval(pollInterval);
|
|
11129
|
+
pollInterval = null;
|
|
11130
|
+
}
|
|
11131
|
+
push({ value, done: false });
|
|
11132
|
+
}
|
|
11133
|
+
done = true;
|
|
11134
|
+
push(null);
|
|
11135
|
+
} catch (e) {
|
|
11136
|
+
error = e;
|
|
11137
|
+
if (pollInterval) {
|
|
11138
|
+
clearInterval(pollInterval);
|
|
11139
|
+
pollInterval = null;
|
|
11140
|
+
}
|
|
11141
|
+
if (resolveNext) {
|
|
11142
|
+
const resolve = resolveNext;
|
|
11143
|
+
resolveNext = null;
|
|
11144
|
+
resolve();
|
|
11145
|
+
}
|
|
11146
|
+
}
|
|
11147
|
+
})();
|
|
11148
|
+
try {
|
|
11149
|
+
while (true) {
|
|
11150
|
+
if (error) {
|
|
11151
|
+
throw error;
|
|
11152
|
+
}
|
|
11153
|
+
if (queue.length > 0) {
|
|
11154
|
+
const item = queue.shift();
|
|
11155
|
+
if (item === null && done) {
|
|
11156
|
+
break;
|
|
11157
|
+
}
|
|
11158
|
+
yield item.value;
|
|
11159
|
+
} else {
|
|
11160
|
+
if (done) {
|
|
11161
|
+
break;
|
|
11162
|
+
}
|
|
11163
|
+
await new Promise((resolve) => {
|
|
11164
|
+
resolveNext = resolve;
|
|
11165
|
+
});
|
|
11166
|
+
}
|
|
11167
|
+
}
|
|
11168
|
+
} finally {
|
|
11169
|
+
if (pollInterval) {
|
|
11170
|
+
clearInterval(pollInterval);
|
|
11171
|
+
pollInterval = null;
|
|
11172
|
+
}
|
|
11173
|
+
}
|
|
11174
|
+
};
|
|
11052
11175
|
getOpenRouterStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal, temperature = 0.95) {
|
|
11053
11176
|
const messages = [];
|
|
11054
11177
|
if (systemInstruction) {
|
|
@@ -11928,6 +12051,7 @@ ${newMemoryListStr}
|
|
|
11928
12051
|
let targetModel = "gemma-4-26b-a4b-it";
|
|
11929
12052
|
if (aiProvider === "OpenRouter") targetModel = "google/gemma-4-26b-a4b-it:free";
|
|
11930
12053
|
if (aiProvider === "DeepSeek") targetModel = "deepseek-v4-flash";
|
|
12054
|
+
if (aiProvider === "NVIDIA") targetModel = "moonshotai/kimi-k2.6";
|
|
11931
12055
|
while (attempts <= maxAttempts && !success) {
|
|
11932
12056
|
attempts++;
|
|
11933
12057
|
try {
|
|
@@ -11994,7 +12118,7 @@ Provide a consolidated summary of the entire session.`;
|
|
|
11994
12118
|
let targetModel = "gemma-4-26b-a4b-it";
|
|
11995
12119
|
if (aiProvider === "OpenRouter") targetModel = "google/gemma-4-26b-a4b-it:free";
|
|
11996
12120
|
if (aiProvider === "DeepSeek") targetModel = "deepseek-v4-flash";
|
|
11997
|
-
if (aiProvider === "NVIDIA") targetModel = "
|
|
12121
|
+
if (aiProvider === "NVIDIA") targetModel = "moonshotai/kimi-k2.6";
|
|
11998
12122
|
let attempts = 0;
|
|
11999
12123
|
let success = false;
|
|
12000
12124
|
let response = null;
|
|
@@ -12373,7 +12497,6 @@ Provide a consolidated summary of the entire session.`;
|
|
|
12373
12497
|
};
|
|
12374
12498
|
yield { type: "status", content: "[start]" };
|
|
12375
12499
|
yield { type: "status", content: "Gathering Context..." };
|
|
12376
|
-
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
12377
12500
|
const totalFolders = countFolders(process.cwd());
|
|
12378
12501
|
let dynamicMaxDepth = 12;
|
|
12379
12502
|
if (totalFolders > 4096) dynamicMaxDepth = 1;
|
|
@@ -12935,7 +13058,7 @@ ${ideErr} [/ERROR]`;
|
|
|
12935
13058
|
0.99
|
|
12936
13059
|
);
|
|
12937
13060
|
} else if (aiProvider === "NVIDIA") {
|
|
12938
|
-
|
|
13061
|
+
const rawStream = getNVIDIAStream(
|
|
12939
13062
|
settings.apiKey,
|
|
12940
13063
|
targetModel,
|
|
12941
13064
|
activeContents,
|
|
@@ -12946,6 +13069,7 @@ ${ideErr} [/ERROR]`;
|
|
|
12946
13069
|
abortController.signal,
|
|
12947
13070
|
0.99
|
|
12948
13071
|
);
|
|
13072
|
+
stream = wrapNvidiaStreamWithQueueDepth(rawStream, targetModel);
|
|
12949
13073
|
} else {
|
|
12950
13074
|
const apiCallPromise = client.models.generateContentStream({
|
|
12951
13075
|
model: targetModel || "gemini-3-flash-preview",
|
|
@@ -13173,6 +13297,10 @@ ${ideErr} [/ERROR]`;
|
|
|
13173
13297
|
abortPromise
|
|
13174
13298
|
]);
|
|
13175
13299
|
if (done) break;
|
|
13300
|
+
if (chunk && chunk.type === "status") {
|
|
13301
|
+
yield chunk;
|
|
13302
|
+
continue;
|
|
13303
|
+
}
|
|
13176
13304
|
if (settings && typeof settings.onTokenChunk === "function") {
|
|
13177
13305
|
settings.onTokenChunk();
|
|
13178
13306
|
}
|
|
@@ -13584,7 +13712,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13584
13712
|
label = `\u{1F6C7} Cancelled${detail2 ? `: ${detail2}` : ""}`;
|
|
13585
13713
|
} else if (normToolName === "EmergencyRollback") {
|
|
13586
13714
|
const { method } = parseArgs(toolCall.args);
|
|
13587
|
-
label =
|
|
13715
|
+
label = method === "forceRevert" ? "" : "\u2714 Rollback Point Checked";
|
|
13588
13716
|
} else if (normToolName === "await" || normToolName === "Await") {
|
|
13589
13717
|
const { time } = parseArgs(toolCall.args);
|
|
13590
13718
|
let sec = parseFloat(time) || 0;
|
|
@@ -14301,6 +14429,28 @@ ${boxBottom}`}`) };
|
|
|
14301
14429
|
${boxMid}
|
|
14302
14430
|
`) };
|
|
14303
14431
|
}
|
|
14432
|
+
if (normToolName === "EmergencyRollback") {
|
|
14433
|
+
const { method } = parseArgs(toolCall.args);
|
|
14434
|
+
if (method === "forceRevert") {
|
|
14435
|
+
let totalFiles = 0;
|
|
14436
|
+
if (result) {
|
|
14437
|
+
const m = result.match(/Total\s*:\s*(\d+)/i);
|
|
14438
|
+
if (m) totalFiles = parseInt(m[1]);
|
|
14439
|
+
}
|
|
14440
|
+
const isErr = result && result.startsWith("ERROR:");
|
|
14441
|
+
const postLabel = isErr ? `\u2718 Emergency Rollback Failed` : `\u2714 Emergency Rollback \u2192 ${totalFiles} file${totalFiles === 1 ? "" : "s"} processed`;
|
|
14442
|
+
let terminalWidth = 115;
|
|
14443
|
+
if (process.stdout.isTTY) {
|
|
14444
|
+
terminalWidth = process.stdout.columns - 5 || 120;
|
|
14445
|
+
}
|
|
14446
|
+
const boxWidth = Math.min(postLabel.length + 4, terminalWidth);
|
|
14447
|
+
const boxMid = `${postLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)}`;
|
|
14448
|
+
const boxBottom = ` ${" ".repeat(boxWidth)} `;
|
|
14449
|
+
yield { type: "visual_feedback", content: colorMainWords(`${boxBottom}
|
|
14450
|
+
${boxMid}
|
|
14451
|
+
`) };
|
|
14452
|
+
}
|
|
14453
|
+
}
|
|
14304
14454
|
if (normToolName === "todo") {
|
|
14305
14455
|
const { method, tasks, markDone } = parseArgs(toolCall.args);
|
|
14306
14456
|
let uiTitle = "";
|
|
@@ -19856,7 +20006,7 @@ Selection: ${val}`,
|
|
|
19856
20006
|
), /* @__PURE__ */ React15.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React15.createElement(Text15, { color: "#555555" }, "\u2580".repeat(Math.max(1, terminalSize.columns))))));
|
|
19857
20007
|
}
|
|
19858
20008
|
};
|
|
19859
|
-
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(
|
|
20009
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, isInitializing ? null : showBridgePromo ? /* @__PURE__ */ React15.createElement(BridgePromo, { width: stdout?.columns || 80, height: stdout?.rows || 24, selectedIndex: promoSelectedIndex, aiProvider }) : /* @__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(
|
|
19860
20010
|
BlockItem,
|
|
19861
20011
|
{
|
|
19862
20012
|
key: block.key,
|
|
@@ -20099,7 +20249,7 @@ var init_app = __esm({
|
|
|
20099
20249
|
options.push({ label: "Continue to CLI only", action: "dismiss" });
|
|
20100
20250
|
return options;
|
|
20101
20251
|
};
|
|
20102
|
-
BridgePromo = ({ width, height, selectedIndex }) => {
|
|
20252
|
+
BridgePromo = ({ width, height, selectedIndex, aiProvider }) => {
|
|
20103
20253
|
const ideName = getIDEName();
|
|
20104
20254
|
const options = getPromoOptions(ideName);
|
|
20105
20255
|
return /* @__PURE__ */ React15.createElement(
|
|
@@ -20111,7 +20261,7 @@ var init_app = __esm({
|
|
|
20111
20261
|
width,
|
|
20112
20262
|
height
|
|
20113
20263
|
},
|
|
20114
|
-
/* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React15.createElement(Text15, null, getFluxLogo(versionFluxflow))),
|
|
20264
|
+
/* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React15.createElement(Text15, null, getFluxLogo(versionFluxflow, aiProvider))),
|
|
20115
20265
|
/* @__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)")))
|
|
20116
20266
|
);
|
|
20117
20267
|
};
|