fluxflow-cli 3.11.5 → 3.12.0
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/README.md +1 -0
- package/dist/fluxflow.js +368 -80
- package/model_config.json +81 -29
- package/package.json +72 -72
package/README.md
CHANGED
package/dist/fluxflow.js
CHANGED
|
@@ -359,6 +359,7 @@ var init_secrets = __esm({
|
|
|
359
359
|
if (provider === "Google") return secrets.GOOGLE_API_KEY || secrets.API_KEY || null;
|
|
360
360
|
if (provider === "DeepSeek") return secrets.DEEPSEEK_API_KEY || null;
|
|
361
361
|
if (provider === "OpenRouter") return secrets.OPENROUTER_API_KEY || null;
|
|
362
|
+
if (provider === "Mistral") return secrets.MISTRAL_API_KEY || null;
|
|
362
363
|
if (provider === "NVIDIA") return secrets.NVIDIA_API_KEY || null;
|
|
363
364
|
} catch (e) {
|
|
364
365
|
}
|
|
@@ -372,6 +373,8 @@ var init_secrets = __esm({
|
|
|
372
373
|
await saveSecret("DEEPSEEK_API_KEY", key);
|
|
373
374
|
} else if (provider === "OpenRouter") {
|
|
374
375
|
await saveSecret("OPENROUTER_API_KEY", key);
|
|
376
|
+
} else if (provider === "Mistral") {
|
|
377
|
+
await saveSecret("MISTRAL_API_KEY", key);
|
|
375
378
|
} else if (provider === "NVIDIA") {
|
|
376
379
|
await saveSecret("NVIDIA_API_KEY", key);
|
|
377
380
|
}
|
|
@@ -5129,7 +5132,7 @@ var init_ChatLayout = __esm({
|
|
|
5129
5132
|
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.textMuted }, part.value);
|
|
5130
5133
|
}));
|
|
5131
5134
|
};
|
|
5132
|
-
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(Box3, { width: 4, flexShrink: 0, justifyContent: "flex-end" }, /* @__PURE__ */ React4.createElement(Text4, { color: finalNumColor }, lineNum)), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: finalPrefixColor }, displayPrefix)), /* @__PURE__ */ React4.createElement(Box3, { marginLeft: 1, backgroundColor: innerBgColor,
|
|
5135
|
+
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(Box3, { width: 4, flexShrink: 0, justifyContent: "flex-end" }, /* @__PURE__ */ React4.createElement(Text4, { color: finalNumColor }, lineNum)), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: finalPrefixColor }, displayPrefix)), /* @__PURE__ */ React4.createElement(Box3, { marginLeft: 1, backgroundColor: innerBgColor, flexGrow: 1 }, renderInlineDiff()));
|
|
5133
5136
|
});
|
|
5134
5137
|
DiffBlock = React4.memo(({ text, columns = 80, extension, theme = "Dark" }) => {
|
|
5135
5138
|
const colors = getThemeColors(theme);
|
|
@@ -5805,7 +5808,7 @@ var init_StatusBar = __esm({
|
|
|
5805
5808
|
};
|
|
5806
5809
|
}, []);
|
|
5807
5810
|
let maxLimit = 262144;
|
|
5808
|
-
if (aiProvider === "NVIDIA" && (activeModel?.includes("glm") || activeModel?.includes("gpt") || activeModel?.includes("qwen"))) {
|
|
5811
|
+
if (aiProvider === "NVIDIA" && (activeModel?.includes("glm") || activeModel?.includes("gpt") || activeModel?.includes("qwen") || activeModel?.includes("medium")) || aiProvider === "Mistral") {
|
|
5809
5812
|
maxLimit = 128e3;
|
|
5810
5813
|
} else if (aiProvider === "DeepSeek" || aiProvider === "Google" && apiTier === "Paid" || aiProvider === "NVIDIA" && (activeModel.includes("deepseek") || activeModel.includes("seed"))) {
|
|
5811
5814
|
maxLimit = 409600;
|
|
@@ -6079,8 +6082,8 @@ Invocation Types:
|
|
|
6079
6082
|
- Invoke (async, background worker for parallel tasks, upto 7 parallel agents together). Usage: Benefits parallelism & speed. Can take long time, If invoked DO NOT REPEAT SAME TASK WHILE ACTIVE
|
|
6080
6083
|
- InvokeSync (sync, blocking main agent loop). Usage: Repeatetive work, Sequential tasks, Task delegation. Tokens/Costs savings
|
|
6081
6084
|
1. [agent:generalist.InvokeSync/Invoke(title="...", task="...")]. Task must me detailed, including exact file paths, imports/exports, dependency, folder structure
|
|
6082
|
-
2. [agent:generalist.GetProgress(id="...")]. Usage: Check progress of async subagent task, taking time? continue your task, MUST await (exponentially longer after 1st check) than spamming getProgress.
|
|
6083
|
-
3. [agent:generalist.Cancel(id="...")]. Usage: Cancel async subagent task,
|
|
6085
|
+
2. [agent:generalist.GetProgress(id="...")]. Usage: Check progress of async subagent task, taking time? continue your task, MUST await (exponentially longer after 1st check) than spamming getProgress. DO NOT SPAM 'GetProgress'
|
|
6086
|
+
3. [agent:generalist.Cancel(id="...")]. Usage: Cancel async subagent task, ONLY IF STALLED FOR UNUSUALLY LONG (2m+) OR DOING SOMETHING WRONG`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
|
|
6084
6087
|
1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout, stable margins & headers/footers, NO WATERMARKS
|
|
6085
6088
|
2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document, NO WATERMARKS, stable margins & headers/footers
|
|
6086
6089
|
- WORKSPACE & SUB AGENT TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
|
|
@@ -7514,7 +7517,7 @@ Check these first; These Files > Training Data. Safety rules apply
|
|
|
7514
7517
|
` : "";
|
|
7515
7518
|
}
|
|
7516
7519
|
const projectContextBlock = cachedProjectContextBlock;
|
|
7517
|
-
return
|
|
7520
|
+
return `=== SYSTEM PROMPT ===
|
|
7518
7521
|
Identity: Flux Flow (by Kushal Roy Chowdhury). ${mode === "Flux" ? "Sassy" : "Conversational, Sassy, Friendly, Humorous, Sarcastic"}, CLI Agent
|
|
7519
7522
|
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"}
|
|
7520
7523
|
|
|
@@ -7525,15 +7528,15 @@ Mode: ${mode}${thinkingLevel !== "Fast" ? "" : ""}. ${mode === "Flux" ? "Logical
|
|
|
7525
7528
|
- SYSTEM NOTIFICATION: [SYSTEM] in user turn
|
|
7526
7529
|
|
|
7527
7530
|
-- THINKING GUIDANCE --
|
|
7528
|
-
${aiProvider === "Google" && !isGemini ? `${thinkingConfig}
|
|
7529
|
-
${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && !isGemini ? `
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
`
|
|
7531
|
+
${aiProvider === "Mistral" || aiProvider === "Google" && !isGemini ? `${thinkingConfig}
|
|
7532
|
+
${thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh" && !isGemini) ? `CRITICAL THINKING POLICY
|
|
7533
|
+
- Use <think> ... </think> before responding, even with simple queries/greetings
|
|
7534
|
+
` : ""}` : `${thinkingConfig}
|
|
7535
|
+
`}
|
|
7533
7536
|
${TOOL_PROTOCOL(mode, osDetected, aiProvider.toLowerCase() === "deepseek" ? false : isMultiModal, aiProvider, systemSettings?.advanceRollback)}
|
|
7534
7537
|
${projectContextBlock}
|
|
7535
|
-
|
|
7536
|
-
-
|
|
7538
|
+
${isMemoryEnabled ? `-- MEMORY RULES --
|
|
7539
|
+
- Subtly Personalize ONLY WITH RELEVENT & CONTEXTUAL MEMORIES. Auto Saves` : ""}
|
|
7537
7540
|
- Temporal Awareness: RELATIVE TIME REFERENCE eg. few mins ago
|
|
7538
7541
|
|
|
7539
7542
|
-- SECURITY RULES --${systemSettings.allowExternalAccess ? "" : "\n- ACCESS CONTROL: CWD only"}
|
|
@@ -7544,10 +7547,11 @@ ${projectContextBlock}
|
|
|
7544
7547
|
- Chat Messages with GFM Formatting
|
|
7545
7548
|
- Language: Same as User Query
|
|
7546
7549
|
- NO CHAT **AFTER** FIRING TOOLS IN CURRENT TURN
|
|
7547
|
-
- Short headsup summary of actions before firing tools
|
|
7548
7550
|
- Task Complete? End response with summary of changes made (with reason) and files edited (if any)
|
|
7549
7551
|
- Basic LaTeX${mode === "Flux" ? "" : ".\nUse Kaomojis HEAVILY"}
|
|
7550
|
-
=== END SYSTEM PROMPT
|
|
7552
|
+
=== END SYSTEM PROMPT ===
|
|
7553
|
+
|
|
7554
|
+
${nameStr}${nicknameStr}${userInstrStr}${userMemoriesStr}`.trim();
|
|
7551
7555
|
};
|
|
7552
7556
|
getJanitorInstruction = (userMemories = "", isMemoryEnabled = true, needTitle = true) => {
|
|
7553
7557
|
return `${userMemories ? `-- CURRENT SAVED USER MEMORIES --
|
|
@@ -10038,8 +10042,9 @@ var init_search_keyword = __esm({
|
|
|
10038
10042
|
"src/tools/search_keyword.js"() {
|
|
10039
10043
|
init_arg_parser();
|
|
10040
10044
|
search_keyword = async (args) => {
|
|
10041
|
-
const { keyword, file, subString, regex } = parseArgs(args);
|
|
10042
|
-
if (
|
|
10045
|
+
const { keyword: rawKeyword, file, subString, regex } = parseArgs(args);
|
|
10046
|
+
if (rawKeyword === void 0 || rawKeyword === null) return 'ERROR: Missing "keyword" argument.';
|
|
10047
|
+
const keyword = String(rawKeyword);
|
|
10043
10048
|
const toBool = (v) => v === true || v === "true" || v === 1 || v === "1" || v === "yes";
|
|
10044
10049
|
const regexExplicitlyFalse = regex === false || regex === "false" || regex === 0 || regex === "0" || regex === "no";
|
|
10045
10050
|
let matchRegex = toBool(regex);
|
|
@@ -11012,9 +11017,11 @@ var init_invoke = __esm({
|
|
|
11012
11017
|
task,
|
|
11013
11018
|
status: "running",
|
|
11014
11019
|
lastChunkTime: Date.now(),
|
|
11020
|
+
wps: 0,
|
|
11015
11021
|
progress: []
|
|
11016
11022
|
// Array of arrays containing logs for each turn
|
|
11017
11023
|
};
|
|
11024
|
+
const wordStats = { chunks: [], totalWords: 0 };
|
|
11018
11025
|
subagentProgress.push(taskEntry);
|
|
11019
11026
|
if (context.onSubagentUpdate) {
|
|
11020
11027
|
context.onSubagentUpdate();
|
|
@@ -11036,9 +11043,22 @@ var init_invoke = __esm({
|
|
|
11036
11043
|
context.onSubagentUpdate();
|
|
11037
11044
|
}
|
|
11038
11045
|
},
|
|
11039
|
-
onTokenChunk: () => {
|
|
11040
|
-
|
|
11046
|
+
onTokenChunk: (_chunkText, chunkWordCount) => {
|
|
11047
|
+
const now = Date.now();
|
|
11048
|
+
taskEntry.lastChunkTime = now;
|
|
11041
11049
|
taskEntry.currentTool = "Thinking";
|
|
11050
|
+
if (typeof chunkWordCount === "number" && chunkWordCount > 0) {
|
|
11051
|
+
wordStats.totalWords += chunkWordCount;
|
|
11052
|
+
wordStats.chunks.push({ time: now, words: chunkWordCount });
|
|
11053
|
+
const cutoff = now - 400;
|
|
11054
|
+
wordStats.chunks = wordStats.chunks.filter((c) => c.time >= cutoff);
|
|
11055
|
+
if (wordStats.chunks.length > 0) {
|
|
11056
|
+
const windowWords = wordStats.chunks.reduce((acc, c) => acc + c.words, 0);
|
|
11057
|
+
const oldestTime = wordStats.chunks[0].time;
|
|
11058
|
+
const timeSpanSec = Math.max(0.4, (now - oldestTime) / 1e3);
|
|
11059
|
+
taskEntry.wps = Math.round(windowWords / timeSpanSec * 10) / 10;
|
|
11060
|
+
}
|
|
11061
|
+
}
|
|
11042
11062
|
if (context.onSubagentUpdate) {
|
|
11043
11063
|
context.onSubagentUpdate();
|
|
11044
11064
|
}
|
|
@@ -11870,7 +11890,7 @@ __export(ai_exports, {
|
|
|
11870
11890
|
import { GoogleGenAI, ThinkingLevel, HarmBlockThreshold, HarmCategory } from "@google/genai";
|
|
11871
11891
|
import path24, { normalize } from "path";
|
|
11872
11892
|
import fs25 from "fs";
|
|
11873
|
-
var client, globalSettings, colorMainWords, withRetry, TERMINATION_SIGNAL, getCleanGroupedLength, stripAnsi2, fetchWithBackoff, getDeepSeekStream, getNVIDIAStream, wrapNvidiaStreamWithQueueDepth, getOpenRouterStream, signalTermination, isTerminationSignaled, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, translateKimiToolCalls, detectToolCalls, initAI, generateSimpleContent, consolidatePastMemories, compressHistory, deleteChatSummary, getAIStream, runSubagent;
|
|
11893
|
+
var client, globalSettings, colorMainWords, withRetry, TERMINATION_SIGNAL, getCleanGroupedLength, stripAnsi2, fetchWithBackoff, getDeepSeekStream, getMistralStream, getNVIDIAStream, wrapNvidiaStreamWithQueueDepth, getOpenRouterStream, signalTermination, isTerminationSignaled, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, translateKimiToolCalls, detectToolCalls, initAI, generateSimpleContent, consolidatePastMemories, compressHistory, deleteChatSummary, getAIStream, runSubagent;
|
|
11874
11894
|
var init_ai = __esm({
|
|
11875
11895
|
async "src/utils/ai.js"() {
|
|
11876
11896
|
await init_prompts();
|
|
@@ -11894,7 +11914,7 @@ var init_ai = __esm({
|
|
|
11894
11914
|
globalSettings = {};
|
|
11895
11915
|
colorMainWords = (label) => {
|
|
11896
11916
|
if (!label) return label;
|
|
11897
|
-
return label.replace(/(?:(\x1b\[\d+m))?([
|
|
11917
|
+
return label.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻↷•🛇])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Processed|Auto-Read|Skipped|List|Generated|Written|Searched|AI Search|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) => {
|
|
11898
11918
|
return `${ansiBefore || ""}${icon}${ansiAfter || ""} \x1B[95m${word}\x1B[0m`;
|
|
11899
11919
|
});
|
|
11900
11920
|
};
|
|
@@ -12186,6 +12206,130 @@ var init_ai = __esm({
|
|
|
12186
12206
|
}
|
|
12187
12207
|
}
|
|
12188
12208
|
};
|
|
12209
|
+
getMistralStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal, temperature = 0.99) {
|
|
12210
|
+
const messages = [];
|
|
12211
|
+
if (systemInstruction) {
|
|
12212
|
+
messages.push({ role: "system", content: systemInstruction });
|
|
12213
|
+
}
|
|
12214
|
+
for (const content of contents) {
|
|
12215
|
+
const role = content.role === "user" ? "user" : "assistant";
|
|
12216
|
+
const msgContent = [];
|
|
12217
|
+
if (Array.isArray(content.parts)) {
|
|
12218
|
+
for (const part of content.parts) {
|
|
12219
|
+
if (part.text) {
|
|
12220
|
+
msgContent.push({ type: "text", text: part.text });
|
|
12221
|
+
} else if (part.inlineData && isMultiModal) {
|
|
12222
|
+
const mimeType = part.inlineData.mimeType;
|
|
12223
|
+
const data = part.inlineData.data;
|
|
12224
|
+
if (mimeType.startsWith("image/")) {
|
|
12225
|
+
msgContent.push({
|
|
12226
|
+
type: "image_url",
|
|
12227
|
+
image_url: `data:${mimeType};base64,${data}`
|
|
12228
|
+
});
|
|
12229
|
+
}
|
|
12230
|
+
}
|
|
12231
|
+
}
|
|
12232
|
+
} else {
|
|
12233
|
+
const text = content.text || "";
|
|
12234
|
+
if (text) msgContent.push({ type: "text", text });
|
|
12235
|
+
}
|
|
12236
|
+
if (msgContent.length > 0) {
|
|
12237
|
+
messages.push({
|
|
12238
|
+
role,
|
|
12239
|
+
content: msgContent.length === 1 && msgContent[0].type === "text" ? msgContent[0].text : msgContent
|
|
12240
|
+
});
|
|
12241
|
+
}
|
|
12242
|
+
}
|
|
12243
|
+
const requestPayload = {
|
|
12244
|
+
model,
|
|
12245
|
+
messages,
|
|
12246
|
+
stream: true,
|
|
12247
|
+
temperature,
|
|
12248
|
+
prompt_cache_key: "flux-flow-session"
|
|
12249
|
+
};
|
|
12250
|
+
const response = await fetchWithBackoff("https://api.mistral.ai/v1/chat/completions", {
|
|
12251
|
+
method: "POST",
|
|
12252
|
+
headers: {
|
|
12253
|
+
"Authorization": `Bearer ${apiKey}`,
|
|
12254
|
+
"Content-Type": "application/json"
|
|
12255
|
+
},
|
|
12256
|
+
body: JSON.stringify(requestPayload),
|
|
12257
|
+
signal
|
|
12258
|
+
});
|
|
12259
|
+
if (!response.ok) {
|
|
12260
|
+
const errText = await response.text().catch(() => "");
|
|
12261
|
+
let errMsg = response.statusText;
|
|
12262
|
+
try {
|
|
12263
|
+
const errData = JSON.parse(errText);
|
|
12264
|
+
errMsg = errData.error?.message || errData.message || JSON.stringify(errData.detail || errData);
|
|
12265
|
+
} catch {
|
|
12266
|
+
if (errText) errMsg = errText;
|
|
12267
|
+
}
|
|
12268
|
+
throw new Error(`Mistral Error (${response.status}): ${errMsg}`);
|
|
12269
|
+
}
|
|
12270
|
+
const reader = response.body.getReader();
|
|
12271
|
+
const decoder = new TextDecoder();
|
|
12272
|
+
let buffer = "";
|
|
12273
|
+
let pendingParts = [];
|
|
12274
|
+
let latestUsageMetadata = null;
|
|
12275
|
+
let lastFlushTime = Date.now();
|
|
12276
|
+
let hasNewData = false;
|
|
12277
|
+
while (true) {
|
|
12278
|
+
const { done, value } = await reader.read();
|
|
12279
|
+
if (done) {
|
|
12280
|
+
if (hasNewData && (pendingParts.length > 0 || latestUsageMetadata)) {
|
|
12281
|
+
yield {
|
|
12282
|
+
candidates: pendingParts.length > 0 ? [{ content: { parts: pendingParts } }] : [],
|
|
12283
|
+
usageMetadata: latestUsageMetadata
|
|
12284
|
+
};
|
|
12285
|
+
}
|
|
12286
|
+
break;
|
|
12287
|
+
}
|
|
12288
|
+
buffer += decoder.decode(value, { stream: true });
|
|
12289
|
+
const lines = buffer.split("\n");
|
|
12290
|
+
buffer = lines.pop();
|
|
12291
|
+
for (const line of lines) {
|
|
12292
|
+
const cleanLine = line.trim();
|
|
12293
|
+
if (!cleanLine || !cleanLine.startsWith("data: ")) continue;
|
|
12294
|
+
if (cleanLine === "data: [DONE]") break;
|
|
12295
|
+
try {
|
|
12296
|
+
const json = JSON.parse(cleanLine.substring(6));
|
|
12297
|
+
const delta = json.choices?.[0]?.delta;
|
|
12298
|
+
const usage = json.usage;
|
|
12299
|
+
if (usage) {
|
|
12300
|
+
latestUsageMetadata = {
|
|
12301
|
+
totalTokenCount: usage.total_tokens || (usage.prompt_tokens || 0) + (usage.completion_tokens || 0),
|
|
12302
|
+
promptTokenCount: usage.prompt_tokens || 0,
|
|
12303
|
+
candidatesTokenCount: usage.completion_tokens || 0,
|
|
12304
|
+
cachedContentTokenCount: usage.prompt_tokens_details?.cached_tokens || 0,
|
|
12305
|
+
thoughtsTokenCount: 0
|
|
12306
|
+
};
|
|
12307
|
+
hasNewData = true;
|
|
12308
|
+
}
|
|
12309
|
+
if (delta) {
|
|
12310
|
+
if (delta.thinking) {
|
|
12311
|
+
pendingParts.push({ text: delta.thinking, thought: true });
|
|
12312
|
+
hasNewData = true;
|
|
12313
|
+
}
|
|
12314
|
+
if (delta.content) {
|
|
12315
|
+
pendingParts.push({ text: delta.content });
|
|
12316
|
+
hasNewData = true;
|
|
12317
|
+
}
|
|
12318
|
+
}
|
|
12319
|
+
} catch (e) {
|
|
12320
|
+
}
|
|
12321
|
+
}
|
|
12322
|
+
if (Date.now() - lastFlushTime >= 150 && hasNewData) {
|
|
12323
|
+
yield {
|
|
12324
|
+
candidates: pendingParts.length > 0 ? [{ content: { parts: [...pendingParts] } }] : [],
|
|
12325
|
+
usageMetadata: latestUsageMetadata
|
|
12326
|
+
};
|
|
12327
|
+
pendingParts = [];
|
|
12328
|
+
lastFlushTime = Date.now();
|
|
12329
|
+
hasNewData = false;
|
|
12330
|
+
}
|
|
12331
|
+
}
|
|
12332
|
+
};
|
|
12189
12333
|
getNVIDIAStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal = false, signal, temperature = 0.99) {
|
|
12190
12334
|
const messages = [];
|
|
12191
12335
|
if (systemInstruction) {
|
|
@@ -12202,7 +12346,7 @@ var init_ai = __esm({
|
|
|
12202
12346
|
const mimeType = part.inlineData.mimeType;
|
|
12203
12347
|
const data = part.inlineData.data;
|
|
12204
12348
|
const isImage = mimeType.startsWith("image/");
|
|
12205
|
-
if (isImage &&
|
|
12349
|
+
if (isImage && isModelMultimodal(model)) {
|
|
12206
12350
|
msgContent.push({
|
|
12207
12351
|
type: "image_url",
|
|
12208
12352
|
image_url: {
|
|
@@ -12817,6 +12961,22 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
12817
12961
|
const iterator2 = stream[Symbol.asyncIterator]();
|
|
12818
12962
|
const firstResult2 = await iterator2.next();
|
|
12819
12963
|
return { iterator: iterator2, firstResult: firstResult2 };
|
|
12964
|
+
} else if (aiProvider === "Mistral" && !useNvidiaFallback) {
|
|
12965
|
+
const stream = getMistralStream(
|
|
12966
|
+
apiKey,
|
|
12967
|
+
getFallbackValue("mistral_janitor_fallback"),
|
|
12968
|
+
janitorContents,
|
|
12969
|
+
janitorPrompt,
|
|
12970
|
+
"Fast",
|
|
12971
|
+
// Janitor always minimal
|
|
12972
|
+
mode,
|
|
12973
|
+
false,
|
|
12974
|
+
null,
|
|
12975
|
+
0.6
|
|
12976
|
+
);
|
|
12977
|
+
const iterator2 = stream[Symbol.asyncIterator]();
|
|
12978
|
+
const firstResult2 = await iterator2.next();
|
|
12979
|
+
return { iterator: iterator2, firstResult: firstResult2 };
|
|
12820
12980
|
} else if (aiProvider === "NVIDIA" || useNvidiaFallback) {
|
|
12821
12981
|
const stream = getNVIDIAStream(
|
|
12822
12982
|
useNvidiaFallback ? nvidiaApiKey : apiKey,
|
|
@@ -13311,11 +13471,13 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
13311
13471
|
try {
|
|
13312
13472
|
let stream;
|
|
13313
13473
|
if (aiProvider === "OpenRouter") {
|
|
13314
|
-
stream = getOpenRouterStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode,
|
|
13474
|
+
stream = getOpenRouterStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, isModelMultimodal(model), signal, temperature);
|
|
13315
13475
|
} else if (aiProvider === "DeepSeek") {
|
|
13316
|
-
stream = getDeepSeekStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode,
|
|
13476
|
+
stream = getDeepSeekStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, isModelMultimodal(model), signal, temperature);
|
|
13477
|
+
} else if (aiProvider === "Mistral") {
|
|
13478
|
+
stream = getMistralStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, isModelMultimodal(model), signal, temperature);
|
|
13317
13479
|
} else if (aiProvider === "NVIDIA") {
|
|
13318
|
-
stream = getNVIDIAStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode,
|
|
13480
|
+
stream = getNVIDIAStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, isModelMultimodal(model), signal, temperature);
|
|
13319
13481
|
} else {
|
|
13320
13482
|
const genStream = await client.models.generateContentStream({
|
|
13321
13483
|
model,
|
|
@@ -13469,6 +13631,7 @@ ${newMemoryListStr}
|
|
|
13469
13631
|
let targetModel = getFallbackValue("gemma_janitor_fallback_google");
|
|
13470
13632
|
if (aiProvider === "OpenRouter") targetModel = getFallbackValue("janitor_open_router");
|
|
13471
13633
|
if (aiProvider === "DeepSeek") targetModel = getFallbackValue("deepseek_level_1");
|
|
13634
|
+
if (aiProvider === "Mistral") targetModel = getFallbackValue("mistral_level_1");
|
|
13472
13635
|
if (aiProvider === "NVIDIA") targetModel = getFallbackValue("nvidia_janitor_fallback");
|
|
13473
13636
|
while (attempts <= maxAttempts && !success) {
|
|
13474
13637
|
attempts++;
|
|
@@ -13536,6 +13699,7 @@ Provide a consolidated summary of the entire session.`;
|
|
|
13536
13699
|
let targetModel = getFallbackValue("gemma_janitor_fallback_google");
|
|
13537
13700
|
if (aiProvider === "OpenRouter") targetModel = getFallbackValue("janitor_open_router");
|
|
13538
13701
|
if (aiProvider === "DeepSeek") targetModel = getFallbackValue("deepseek_level_1");
|
|
13702
|
+
if (aiProvider === "Mistral") targetModel = getFallbackValue("mistral_level_1");
|
|
13539
13703
|
if (aiProvider === "NVIDIA") targetModel = getFallbackValue("nvidia_chat_summarizer_fallback");
|
|
13540
13704
|
let attempts = 0;
|
|
13541
13705
|
let success = false;
|
|
@@ -13660,7 +13824,7 @@ Provide a consolidated summary of the entire session.`;
|
|
|
13660
13824
|
});
|
|
13661
13825
|
let contextCompressionCount = 255e3;
|
|
13662
13826
|
let contextTruncationCount = 26e4;
|
|
13663
|
-
if (aiProvider === "NVIDIA" && (modelName?.includes("glm") || modelName?.includes("gpt") || modelName?.includes("qwen"))) {
|
|
13827
|
+
if (aiProvider === "NVIDIA" && (modelName?.includes("glm") || modelName?.includes("gpt") || modelName?.includes("qwen") || modelName?.includes("medium")) || aiProvider === "Mistral") {
|
|
13664
13828
|
contextCompressionCount = 122e3;
|
|
13665
13829
|
contextTruncationCount = 126e3;
|
|
13666
13830
|
} else if (aiProvider === "DeepSeek" || aiProvider === "Google" && apiTier === "Paid" || aiProvider === "NVIDIA" && (modelName.includes("deepseek") || modelName.includes("seed"))) {
|
|
@@ -14162,6 +14326,25 @@ ${ideCtx.warnings}
|
|
|
14162
14326
|
`) };
|
|
14163
14327
|
continue;
|
|
14164
14328
|
}
|
|
14329
|
+
if (startLine === null && !isMultimodalFile) {
|
|
14330
|
+
let lineCount = 0;
|
|
14331
|
+
try {
|
|
14332
|
+
lineCount = fs25.readFileSync(absPath, "utf8").split(/\r\n|\r|\n/).length;
|
|
14333
|
+
} catch (e) {
|
|
14334
|
+
}
|
|
14335
|
+
if (lineCount > 550) {
|
|
14336
|
+
const label = `\u21B7 Skipped (Too Large): ${path24.basename(filePath)}`;
|
|
14337
|
+
let terminalWidth = 115;
|
|
14338
|
+
if (process.stdout.isTTY) {
|
|
14339
|
+
terminalWidth = process.stdout.columns - 5 || 120;
|
|
14340
|
+
}
|
|
14341
|
+
const boxWidth = Math.min(label.length + 4, terminalWidth);
|
|
14342
|
+
const boxMid = label.padEnd(boxWidth - 2).substring(0, boxWidth - 2);
|
|
14343
|
+
yield { type: "visual_feedback", content: colorMainWords(`${boxMid}
|
|
14344
|
+
`) };
|
|
14345
|
+
continue;
|
|
14346
|
+
}
|
|
14347
|
+
}
|
|
14165
14348
|
const finalStart = startLine !== null ? startLine : 1;
|
|
14166
14349
|
let finalEnd = endLine !== null ? endLine : startLine !== null ? startLine : finalStart + 499;
|
|
14167
14350
|
if (finalEnd - finalStart > 500) {
|
|
@@ -14191,19 +14374,13 @@ ${ideCtx.warnings}
|
|
|
14191
14374
|
if (!isError) {
|
|
14192
14375
|
let label = "";
|
|
14193
14376
|
if (isImage) {
|
|
14194
|
-
label = `\u2714
|
|
14377
|
+
label = `\u2714 Processed: ${path24.basename(filePath)}`;
|
|
14195
14378
|
attachedBinaryPart = binPart;
|
|
14196
14379
|
} else if (isPdf || isOfficeFile) {
|
|
14197
|
-
label = `\u2714
|
|
14380
|
+
label = `\u2714 Auto-Analysed: ${path24.basename(filePath)}`;
|
|
14198
14381
|
attachedBinaryPart = binPart;
|
|
14199
14382
|
} else {
|
|
14200
|
-
|
|
14201
|
-
try {
|
|
14202
|
-
const content = fs25.readFileSync(absPath, "utf8");
|
|
14203
|
-
totalLines = content.split("\n").length;
|
|
14204
|
-
} catch (e) {
|
|
14205
|
-
}
|
|
14206
|
-
label = `\u2714 Auto-Read: ${filePath}`;
|
|
14383
|
+
label = `\u2714 Auto-Read: ${path24.basename(filePath)}`;
|
|
14207
14384
|
taggedContextBlocks.push(textResult);
|
|
14208
14385
|
}
|
|
14209
14386
|
if (label) {
|
|
@@ -14235,7 +14412,9 @@ OS: ${osDetected}
|
|
|
14235
14412
|
CWD: ${process.cwd()}${isPlayground ? " [PLAYGROUND MODE]" : ""}${cwdMismatch ? ` (WARNING: CWD Mismatch! Previous Path: ${lastCwd})` : ""}
|
|
14236
14413
|
**DIRECTORY STRUCTURE**
|
|
14237
14414
|
${dirStructure}${memoryPrompt}${ideBlock}
|
|
14238
|
-
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think
|
|
14415
|
+
${activeSummaryBlock}${thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh" && aiProvider === "Google") ? `${aiProvider === "Mistral" || modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[SYSTEM Priority : HIGH] FOLLOW TOOL CALLING SCHEMA IN SYSTEM PROMPT
|
|
14416
|
+
eg: [tool:functions.ReadFolder(path = ".")]. NO OTHER FORMAT/TOKEN IS ALLOWED [/SYSTEM]
|
|
14417
|
+
${taggedContextStr}[USER PROMPT] ${cleanPromptForModel.trim()} [/USER PROMPT]`.trim();
|
|
14239
14418
|
const userMsgObj = { role: "user", text: firstUserMsg };
|
|
14240
14419
|
if (attachedBinaryPart) {
|
|
14241
14420
|
userMsgObj.binaryPart = attachedBinaryPart;
|
|
@@ -14281,7 +14460,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
14281
14460
|
[SYSTEM] USER QUESTION. RESOLVE THIS SPECIFIC QUERY WITHIN '[ANSWER] ... [/ANSWER]' CONCISELY, NATURALLY [/SYSTEM]
|
|
14282
14461
|
[QUESTION] ${hint.replace("/btw", "").trim()} [/QUESTION]`;
|
|
14283
14462
|
} else {
|
|
14284
|
-
modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] USER QUESTION. RESOLVE THIS SPECIFIC QUERY WITHIN '[ANSWER] ... [/ANSWER]' CONCISELY, NATURALLY\n**STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[QUESTION] ${hint.replace("/btw", "").trim()} [/QUESTION]` });
|
|
14463
|
+
modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh" && aiProvider === "Google") ? `${aiProvider === "Mistral" || modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] USER QUESTION. RESOLVE THIS SPECIFIC QUERY WITHIN '[ANSWER] ... [/ANSWER]' CONCISELY, NATURALLY\n**STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[QUESTION] ${hint.replace("/btw", "").trim()} [/QUESTION]` });
|
|
14285
14464
|
}
|
|
14286
14465
|
} else {
|
|
14287
14466
|
if (modifiedHistory.length > 0 && modifiedHistory[modifiedHistory.length - 1].role === "user") {
|
|
@@ -14289,7 +14468,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
14289
14468
|
|
|
14290
14469
|
[STEERING HINT] ${hint.trim()} [/STEERING HINT]`;
|
|
14291
14470
|
} else {
|
|
14292
|
-
modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[STEERING HINT] ${hint.trim()} [/STEERING HINT]` });
|
|
14471
|
+
modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh" && aiProvider === "Google") ? `${aiProvider === "Mistral" || modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[STEERING HINT] ${hint.trim()} [/STEERING HINT]` });
|
|
14293
14472
|
}
|
|
14294
14473
|
}
|
|
14295
14474
|
yield { type: "status", content: `${hint.startsWith("/btw") ? "Question Forwarded..." : "Steering Hint Injected..."}` };
|
|
@@ -14416,10 +14595,12 @@ ${ideErr} [/ERROR]`;
|
|
|
14416
14595
|
}
|
|
14417
14596
|
yield { type: "status", content: "Working" };
|
|
14418
14597
|
}
|
|
14419
|
-
const
|
|
14420
|
-
if (
|
|
14598
|
+
const isGemmaOrMistral = aiProvider === "Mistral" || aiProvider === "Google" && modelName?.toLowerCase().startsWith("gemma");
|
|
14599
|
+
if (isGemmaOrMistral) {
|
|
14600
|
+
const needsThinkingWarning = thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh");
|
|
14601
|
+
const thinkingText = needsThinkingWarning ? ". **STRICTLY MAINTAIN THINKING POLICY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**" : "";
|
|
14421
14602
|
const jitInstruction = `
|
|
14422
|
-
[SYSTEM] Tool result received. Analyze output and proceed with your turn${
|
|
14603
|
+
[SYSTEM] Tool result received. Analyze output and proceed with your turn${thinkingText} [/SYSTEM]`;
|
|
14423
14604
|
if (lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text?.startsWith("[TOOL RESULT]")) {
|
|
14424
14605
|
lastUserMsg.parts[0].text += jitInstruction;
|
|
14425
14606
|
}
|
|
@@ -14451,13 +14632,11 @@ ${ideErr} [/ERROR]`;
|
|
|
14451
14632
|
} catch (err) {
|
|
14452
14633
|
}
|
|
14453
14634
|
}
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
lastUserMsg.parts[0].text += `
|
|
14635
|
+
const stepThreshold = Math.floor(MAX_LOOPS * (mode === "Flux" ? 0.98 : 0.8));
|
|
14636
|
+
const currentStep = loop + 1;
|
|
14637
|
+
if (currentStep >= stepThreshold && lastUserMsg && lastUserMsg.parts?.[0]) {
|
|
14638
|
+
lastUserMsg.parts[0].text += `
|
|
14459
14639
|
[SYSTEM] WARNING, Turn Limit Impending: Step ${currentStep}/${MAX_LOOPS}. Wrap up quickly/prompt user to continue & use [[END]] quickly. [/SYSTEM]`;
|
|
14460
|
-
}
|
|
14461
14640
|
}
|
|
14462
14641
|
const abortPromise = new Promise((_, reject) => {
|
|
14463
14642
|
if (abortController.signal.aborted) {
|
|
@@ -14494,6 +14673,18 @@ ${ideErr} [/ERROR]`;
|
|
|
14494
14673
|
abortController.signal,
|
|
14495
14674
|
1.05
|
|
14496
14675
|
);
|
|
14676
|
+
} else if (aiProvider === "Mistral") {
|
|
14677
|
+
stream = getMistralStream(
|
|
14678
|
+
settings.apiKey,
|
|
14679
|
+
targetModel,
|
|
14680
|
+
activeContents,
|
|
14681
|
+
currentSystemInstruction,
|
|
14682
|
+
thinkingLevel,
|
|
14683
|
+
mode,
|
|
14684
|
+
isMultiModal,
|
|
14685
|
+
abortController.signal,
|
|
14686
|
+
1
|
|
14687
|
+
);
|
|
14497
14688
|
} else if (aiProvider === "NVIDIA") {
|
|
14498
14689
|
const rawStream = getNVIDIAStream(
|
|
14499
14690
|
settings.apiKey,
|
|
@@ -14862,14 +15053,14 @@ ${ideErr} [/ERROR]`;
|
|
|
14862
15053
|
const title = pArgs.title || pArgs.task;
|
|
14863
15054
|
const id = pArgs.id || pArgs.taskId;
|
|
14864
15055
|
const timeVal = pArgs.time;
|
|
14865
|
-
if (keyword) {
|
|
14866
|
-
detail = keyword.replace(/["']/g, "");
|
|
15056
|
+
if (keyword !== void 0 && keyword !== null) {
|
|
15057
|
+
detail = String(keyword).replace(/["']/g, "");
|
|
14867
15058
|
} else if (filePath) {
|
|
14868
|
-
detail = path24.basename(filePath.replace(/["']/g, "").replace(/\\/g, "/"));
|
|
15059
|
+
detail = path24.basename(String(filePath).replace(/["']/g, "").replace(/\\/g, "/"));
|
|
14869
15060
|
} else if (title && (potentialTool === "invoke" || potentialTool === "invoke_sync")) {
|
|
14870
|
-
detail = title.replace(/["']/g, "").substring(0, 30);
|
|
15061
|
+
detail = String(title).replace(/["']/g, "").substring(0, 30);
|
|
14871
15062
|
} else if (id && potentialTool === "get_progress") {
|
|
14872
|
-
detail = id.replace(/["']/g, "");
|
|
15063
|
+
detail = String(id).replace(/["']/g, "");
|
|
14873
15064
|
} else if (timeVal && potentialTool === "await") {
|
|
14874
15065
|
let sec = parseFloat(String(timeVal).replace(/["']/g, ""));
|
|
14875
15066
|
if (!isNaN(sec)) {
|
|
@@ -14954,16 +15145,16 @@ ${ideErr} [/ERROR]`;
|
|
|
14954
15145
|
const uniqueSentences = new Set(sentences);
|
|
14955
15146
|
const repetitionRatio = sentences.length > 10 ? (sentences.length - uniqueSentences.size) / sentences.length : 0;
|
|
14956
15147
|
const wordCount = thinkContent.split(/\s+/).filter((w) => w.length > 0).length;
|
|
14957
|
-
let repetitionThresholdThinking = 0.
|
|
14958
|
-
let repetitionThresholdResponse = 0.
|
|
15148
|
+
let repetitionThresholdThinking = 0.6;
|
|
15149
|
+
let repetitionThresholdResponse = 0.8;
|
|
14959
15150
|
let isOverVerboseThinking = false;
|
|
14960
|
-
if ((targetModel || "").toLowerCase().startsWith("gemma")) {
|
|
15151
|
+
if ((aiProvider.toLowerCase().includes("google") || aiProvider.toLowerCase().includes("mistral")) && ((targetModel || "").toLowerCase().startsWith("gemma") || (targetModel || "").toLowerCase().includes("stral"))) {
|
|
14961
15152
|
const thinkingCaps = {
|
|
14962
15153
|
"low": 256,
|
|
14963
15154
|
"medium": 768,
|
|
14964
|
-
"high":
|
|
14965
|
-
"max":
|
|
14966
|
-
"xhigh":
|
|
15155
|
+
"high": 8192,
|
|
15156
|
+
"max": 16384,
|
|
15157
|
+
"xhigh": 16384
|
|
14967
15158
|
};
|
|
14968
15159
|
const cap = thinkingCaps[thinkingLevel?.toLowerCase()] || 2500;
|
|
14969
15160
|
isOverVerboseThinking = wordCount > cap;
|
|
@@ -15110,11 +15301,11 @@ ${ideErr} [/ERROR]`;
|
|
|
15110
15301
|
const isOfficeFile = pathLower.endsWith(".docx") || pathLower.endsWith(".doc") || pathLower.endsWith(".ppt") || pathLower.endsWith(".pptx") || pathLower.endsWith(".xls") || pathLower.endsWith(".xlsx");
|
|
15111
15302
|
const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
|
|
15112
15303
|
if (isPdf || isOfficeFile) {
|
|
15113
|
-
label = `\u2714 Analyzed: ${targetPath2}`;
|
|
15304
|
+
label = `\u2714 Analyzed: ${path24.basename(targetPath2)}`;
|
|
15114
15305
|
} else if (isImage) {
|
|
15115
|
-
label = `\u2714
|
|
15306
|
+
label = `\u2714 Processed: ${path24.basename(targetPath2)}`;
|
|
15116
15307
|
} else {
|
|
15117
|
-
label = `${totalLines !== "..." ? "\u2714" : "\u2718"} Read: ${targetPath2} \u2192 ${totalLines !== "..." ? `Lines ${sLine} - ${actualEndLine} of ${totalLines}` : "File Not Found"}`;
|
|
15308
|
+
label = `${totalLines !== "..." ? "\u2714" : "\u2718"} Read: ${path24.basename(targetPath2)} \u2192 ${totalLines !== "..." ? `Lines ${sLine} - ${actualEndLine} of ${totalLines}` : "File Not Found"}`;
|
|
15118
15309
|
}
|
|
15119
15310
|
} else if (normToolName === "list_files" || normToolName === "read_folder") {
|
|
15120
15311
|
const action = normToolName === "list_files" ? "List" : "Browsed";
|
|
@@ -16226,7 +16417,8 @@ Error Log can be found in ${path24.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
16226
16417
|
""
|
|
16227
16418
|
);
|
|
16228
16419
|
msg.text = msg.text.replaceAll(/\n\[SYSTEM\] File Changes:\n(?:\* .+ \(created|modified|deleted\)\n)*\[\/SYSTEM\]/g, "");
|
|
16229
|
-
|
|
16420
|
+
const isGemmaOrMistral = aiProvider === "Mistral" || aiProvider === "Google" && modelName?.toLowerCase().startsWith("gemma");
|
|
16421
|
+
if (isGemmaOrMistral && msg.text.startsWith("[TOOL RESULT]")) {
|
|
16230
16422
|
const jitInstructionFast = `
|
|
16231
16423
|
[SYSTEM] Tool result received. Analyze output and proceed with your turn [/SYSTEM]`;
|
|
16232
16424
|
const jitInstructionThinking = `
|
|
@@ -16426,16 +16618,16 @@ ${cleanResponse}
|
|
|
16426
16618
|
label = `\u2714 \x1B[95mScraped\x1B[0m`;
|
|
16427
16619
|
} else if (normalizedToolName === "view_file" || normalizedToolName === "viewfile" || normalizedToolName === "readfile") {
|
|
16428
16620
|
const path26 = parseArgs(toolCall.args).path || "";
|
|
16429
|
-
label = `\u2714 \x1B[95mRead
|
|
16621
|
+
label = `\u2714 \x1B[95mRead\x1B[0m: ${path26}`;
|
|
16430
16622
|
} else if (normalizedToolName === "list_files" || normalizedToolName === "read_folder" || normalizedToolName === "readfolder") {
|
|
16431
16623
|
const path26 = parseArgs(toolCall.args).path || "";
|
|
16432
|
-
label = `\u2714 \x1B[95mBrowsed
|
|
16624
|
+
label = `\u2714 \x1B[95mBrowsed\x1B[0m: ${path26}`;
|
|
16433
16625
|
} else if (normalizedToolName === "write_file" || normalizedToolName === "writefile") {
|
|
16434
16626
|
const path26 = parseArgs(toolCall.args).path || "";
|
|
16435
|
-
label = `\u2714 \x1B[
|
|
16627
|
+
label = `\u2714 \x1B[95mCreated\x1B[0m: ${path26}`;
|
|
16436
16628
|
} else if (normalizedToolName === "update_file" || normalizedToolName === "updatefile" || normalizedToolName === "patchfile" || normalizedToolName === "patch_file" || normalizedToolName === "patchfile" || normalizedToolName === "updatefile") {
|
|
16437
16629
|
const path26 = parseArgs(toolCall.args).path || "";
|
|
16438
|
-
label = `\u2714 \x1B[
|
|
16630
|
+
label = `\u2714 \x1B[95mEdited\x1B[0m: ${path26}`;
|
|
16439
16631
|
} else if (normalizedToolName === "file_map" || normalizedToolName === "filemap") {
|
|
16440
16632
|
const path26 = parseArgs(toolCall.args).path || "";
|
|
16441
16633
|
label = `\u2714 \x1B[95mIndexed\x1B[0m: ${path26}`;
|
|
@@ -17757,12 +17949,13 @@ function App({ args = [] }) {
|
|
|
17757
17949
|
i++;
|
|
17758
17950
|
} else if (arg === "--provider" && args[i + 1]) {
|
|
17759
17951
|
const val = args[i + 1].toLowerCase();
|
|
17760
|
-
if (["google", "deepseek", "openrouter", "nvidia"].includes(val)) {
|
|
17952
|
+
if (["google", "deepseek", "openrouter", "nvidia", "mistral"].includes(val)) {
|
|
17761
17953
|
let mapped = "Google";
|
|
17762
17954
|
if (val === "google") mapped = "Google";
|
|
17763
17955
|
else if (val === "deepseek") mapped = "DeepSeek";
|
|
17764
17956
|
else if (val === "openrouter") mapped = "OpenRouter";
|
|
17765
17957
|
else if (val === "nvidia") mapped = "NVIDIA";
|
|
17958
|
+
else if (val === "mistral") mapped = "Mistral";
|
|
17766
17959
|
parsed.provider = mapped;
|
|
17767
17960
|
}
|
|
17768
17961
|
i++;
|
|
@@ -17977,7 +18170,7 @@ function App({ args = [] }) {
|
|
|
17977
18170
|
useEffect12(() => {
|
|
17978
18171
|
if (prevProviderRef.current !== aiProvider) {
|
|
17979
18172
|
prevProviderRef.current = aiProvider;
|
|
17980
|
-
const hasStandard = aiProvider === "DeepSeek" || aiProvider === "NVIDIA";
|
|
18173
|
+
const hasStandard = aiProvider === "DeepSeek" || aiProvider === "NVIDIA" || aiProvider === "Mistral";
|
|
17981
18174
|
setThinkingLevel(hasStandard ? "Standard" : "Medium");
|
|
17982
18175
|
} else {
|
|
17983
18176
|
if (aiProvider === "Google" && thinkingLevel === "xHigh") {
|
|
@@ -18011,6 +18204,10 @@ function App({ args = [] }) {
|
|
|
18011
18204
|
modelDisplayName = "Gemma";
|
|
18012
18205
|
} else if (defaultModel.includes("deepseek")) {
|
|
18013
18206
|
modelDisplayName = "DeepSeek Flash";
|
|
18207
|
+
} else if (defaultModel.includes("devstral")) {
|
|
18208
|
+
modelDisplayName = "Devstral";
|
|
18209
|
+
} else if (defaultModel.includes("mistral")) {
|
|
18210
|
+
modelDisplayName = "Mistral";
|
|
18014
18211
|
} else if (defaultModel.includes("gemini")) {
|
|
18015
18212
|
modelDisplayName = "Gemini Flash";
|
|
18016
18213
|
}
|
|
@@ -18841,11 +19038,33 @@ function App({ args = [] }) {
|
|
|
18841
19038
|
}, [mode, thinkingLevel, aiProvider, activeModel, showFullThinking, systemSettings, profileData, imageSettings, isInitializing, parsedArgs, apiTier]);
|
|
18842
19039
|
const handleSetup = async (val) => {
|
|
18843
19040
|
const key = val.trim();
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
19041
|
+
const validators = {
|
|
19042
|
+
Google: {
|
|
19043
|
+
prefix: "AIzaSy",
|
|
19044
|
+
minLength: 39
|
|
19045
|
+
},
|
|
19046
|
+
OpenRouter: {
|
|
19047
|
+
prefix: "sk-or-v1-",
|
|
19048
|
+
minLength: 73
|
|
19049
|
+
},
|
|
19050
|
+
DeepSeek: {
|
|
19051
|
+
prefix: "sk-",
|
|
19052
|
+
minLength: 35
|
|
19053
|
+
},
|
|
19054
|
+
Mistral: {
|
|
19055
|
+
prefix: "",
|
|
19056
|
+
minLength: 32
|
|
19057
|
+
},
|
|
19058
|
+
NVIDIA: {
|
|
19059
|
+
prefix: "nvapi-",
|
|
19060
|
+
minLength: 70
|
|
19061
|
+
}
|
|
19062
|
+
};
|
|
19063
|
+
const { prefix, minLength } = validators[aiProvider] ?? {
|
|
19064
|
+
prefix: "",
|
|
19065
|
+
minLength: 0
|
|
19066
|
+
};
|
|
19067
|
+
if (key.startsWith(prefix) && key.length >= minLength) {
|
|
18849
19068
|
await saveProviderAPIKey(aiProvider, key);
|
|
18850
19069
|
setApiKey(key);
|
|
18851
19070
|
initAI(key, { aiProvider, onIDEApproval: resetPendingApproval });
|
|
@@ -18860,7 +19079,14 @@ function App({ args = [] }) {
|
|
|
18860
19079
|
setActiveModel(defaultModel);
|
|
18861
19080
|
setMessages((prev) => [...prev, { role: "system", text: `${aiProvider} API Key saved successfully! Model set to ${defaultModel}. Initialization complete.`, isMeta: true }]);
|
|
18862
19081
|
} else {
|
|
18863
|
-
setMessages((prev) => [
|
|
19082
|
+
setMessages((prev) => [
|
|
19083
|
+
...prev,
|
|
19084
|
+
{
|
|
19085
|
+
role: "system",
|
|
19086
|
+
text: `INVALID KEY: ${aiProvider} API key must start with "${prefix}" and be at least ${minLength} characters long.`,
|
|
19087
|
+
isMeta: true
|
|
19088
|
+
}
|
|
19089
|
+
]);
|
|
18864
19090
|
setTempKey("");
|
|
18865
19091
|
}
|
|
18866
19092
|
};
|
|
@@ -18926,6 +19152,12 @@ function App({ args = [] }) {
|
|
|
18926
19152
|
{ cmd: "Medium", desc: "Balanced Reasoning" },
|
|
18927
19153
|
{ cmd: "High", desc: "Deep Reasoning" },
|
|
18928
19154
|
{ cmd: "xHigh", desc: "Extended Reasoning" }
|
|
19155
|
+
] : aiProvider === "Mistral" ? [
|
|
19156
|
+
{ cmd: "Fast", desc: "None (No Reasoning)" },
|
|
19157
|
+
{ cmd: "Low", desc: "Minimal Reasoning" },
|
|
19158
|
+
{ cmd: "Medium", desc: "Medium Reasoning" },
|
|
19159
|
+
{ cmd: "High", desc: "High Reasoning" },
|
|
19160
|
+
{ cmd: "xHigh", desc: "Extended Reasoning" }
|
|
18929
19161
|
] : activeModel && activeModel.toLowerCase().startsWith("gemini-3") ? [
|
|
18930
19162
|
{ cmd: "Fast", desc: "Fastest" },
|
|
18931
19163
|
{ cmd: "Low", desc: "Quick Reasoning" },
|
|
@@ -20807,6 +21039,7 @@ Selection: ${val}`,
|
|
|
20807
21039
|
{ label: "Google (Free/Paid)", value: "Google" },
|
|
20808
21040
|
{ label: "Nvidia (Free/Paid)", value: "NVIDIA" },
|
|
20809
21041
|
{ label: "DeepSeek (Paid)", value: "DeepSeek" },
|
|
21042
|
+
{ label: "Mistral (Free/Paid) [EXPERIMENTAL]", value: "Mistral" },
|
|
20810
21043
|
{ label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" },
|
|
20811
21044
|
{ label: "Back", value: "settings" }
|
|
20812
21045
|
],
|
|
@@ -21637,7 +21870,7 @@ Selection: ${val}`,
|
|
|
21637
21870
|
}
|
|
21638
21871
|
)));
|
|
21639
21872
|
default:
|
|
21640
|
-
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "[ ESC to Close ]")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6, theme: systemSettings.theme }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true }, "ACTIVE SUBAGENTS")), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, width: "100%" }, activeSubagents.filter((sa) => sa.status === "running").map((sa) => /* @__PURE__ */ React16.createElement(SubagentRow, { key: sa.id, sa })))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, null, statusText ? /* @__PURE__ */ React16.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React16.createElement(build_default, null), /* @__PURE__ */ React16.createElement(
|
|
21873
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "[ ESC to Close ]")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6, theme: systemSettings.theme }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true }, "ACTIVE SUBAGENTS")), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, width: "100%" }, activeSubagents.filter((sa) => sa.status === "running").map((sa) => /* @__PURE__ */ React16.createElement(SubagentRow, { key: sa.id, sa, showTPMEstimate: systemSettings.showTPMEstimate })))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, null, statusText ? /* @__PURE__ */ React16.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React16.createElement(build_default, null), /* @__PURE__ */ React16.createElement(
|
|
21641
21874
|
GlintText_default,
|
|
21642
21875
|
{
|
|
21643
21876
|
text: statusText.trimEnd(),
|
|
@@ -21752,6 +21985,7 @@ Selection: ${val}`,
|
|
|
21752
21985
|
{ label: "Google (Free/Paid)", value: "Google" },
|
|
21753
21986
|
{ label: "Nvidia (Free/Paid)", value: "NVIDIA" },
|
|
21754
21987
|
{ label: "DeepSeek (Paid)", value: "DeepSeek" },
|
|
21988
|
+
{ label: "Mistral (Free/Paid) [EXPERIMENTAL]", value: "Mistral" },
|
|
21755
21989
|
{ label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" }
|
|
21756
21990
|
],
|
|
21757
21991
|
onSelect: (item) => {
|
|
@@ -22168,10 +22402,64 @@ var init_app = __esm({
|
|
|
22168
22402
|
}
|
|
22169
22403
|
return "#ff0000";
|
|
22170
22404
|
};
|
|
22171
|
-
SubagentRow = React16.memo(({ sa }) => {
|
|
22405
|
+
SubagentRow = React16.memo(({ sa, showTPMEstimate = false }) => {
|
|
22172
22406
|
const [dotColor, setDotColor] = useState15("green");
|
|
22407
|
+
const [displayedWps, setDisplayedWps] = useState15(0);
|
|
22173
22408
|
const chunkTimesRef = useRef4([]);
|
|
22174
22409
|
const smoothedDelayRef = useRef4(370);
|
|
22410
|
+
const wpsHistoryRef = useRef4([]);
|
|
22411
|
+
const lastChunkTimeRef = useRef4(sa.lastChunkTime);
|
|
22412
|
+
useEffect12(() => {
|
|
22413
|
+
lastChunkTimeRef.current = sa.lastChunkTime;
|
|
22414
|
+
}, [sa.lastChunkTime]);
|
|
22415
|
+
useEffect12(() => {
|
|
22416
|
+
if (sa.status !== "running") {
|
|
22417
|
+
wpsHistoryRef.current = [];
|
|
22418
|
+
return;
|
|
22419
|
+
}
|
|
22420
|
+
if (sa.wps > 0) {
|
|
22421
|
+
const history = wpsHistoryRef.current;
|
|
22422
|
+
history.push(sa.wps);
|
|
22423
|
+
if (history.length > 3) {
|
|
22424
|
+
history.shift();
|
|
22425
|
+
}
|
|
22426
|
+
setDisplayedWps(Math.round(sa.wps));
|
|
22427
|
+
}
|
|
22428
|
+
}, [sa.status, sa.wps, sa.lastChunkTime]);
|
|
22429
|
+
useEffect12(() => {
|
|
22430
|
+
if (sa.status !== "running") {
|
|
22431
|
+
setDisplayedWps(0);
|
|
22432
|
+
return;
|
|
22433
|
+
}
|
|
22434
|
+
const timer = setInterval(() => {
|
|
22435
|
+
const lastTime = lastChunkTimeRef.current;
|
|
22436
|
+
const timeSinceLast = lastTime > 0 ? Date.now() - lastTime : 0;
|
|
22437
|
+
if (lastTime > 0 && timeSinceLast > 1500) {
|
|
22438
|
+
wpsHistoryRef.current = [];
|
|
22439
|
+
setDisplayedWps(0);
|
|
22440
|
+
} else if (lastTime > 0 && timeSinceLast > 600) {
|
|
22441
|
+
if (wpsHistoryRef.current.length > 0) {
|
|
22442
|
+
wpsHistoryRef.current.shift();
|
|
22443
|
+
}
|
|
22444
|
+
const history = wpsHistoryRef.current;
|
|
22445
|
+
if (history.length > 0) {
|
|
22446
|
+
const sum = history.reduce((acc, val) => acc + val, 0);
|
|
22447
|
+
setDisplayedWps(Math.round(sum / history.length));
|
|
22448
|
+
} else {
|
|
22449
|
+
setDisplayedWps(0);
|
|
22450
|
+
}
|
|
22451
|
+
} else {
|
|
22452
|
+
const history = wpsHistoryRef.current;
|
|
22453
|
+
if (history.length > 0) {
|
|
22454
|
+
const sum = history.reduce((acc, val) => acc + val, 0);
|
|
22455
|
+
setDisplayedWps(Math.round(sum / history.length));
|
|
22456
|
+
} else if (sa.wps > 0) {
|
|
22457
|
+
setDisplayedWps(Math.round(sa.wps));
|
|
22458
|
+
}
|
|
22459
|
+
}
|
|
22460
|
+
}, 750);
|
|
22461
|
+
return () => clearInterval(timer);
|
|
22462
|
+
}, [sa.status]);
|
|
22175
22463
|
useEffect12(() => {
|
|
22176
22464
|
if (sa.status !== "running") {
|
|
22177
22465
|
chunkTimesRef.current = [];
|
|
@@ -22214,7 +22502,7 @@ var init_app = __esm({
|
|
|
22214
22502
|
const timer = setInterval(checkLatency, 100);
|
|
22215
22503
|
return () => clearInterval(timer);
|
|
22216
22504
|
}, [sa.status, sa.lastChunkTime]);
|
|
22217
|
-
return /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " \u2022 ", sa.title, " ", /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true }, "(", sa.id, ")")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true, bold: true }, sa.currentTool || "Active"), /* @__PURE__ */ React16.createElement(Text16, { color: dotColor }, " \u25CF")));
|
|
22505
|
+
return /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " \u2022 ", sa.title, " ", /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true }, "(", sa.id, ")")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true, bold: true }, sa.currentTool || "Active"), /* @__PURE__ */ React16.createElement(Text16, { color: dotColor }, " \u25CF"), showTPMEstimate && /* @__PURE__ */ React16.createElement(Text16, { color: "white", dimColor: true, bold: true }, " (", displayedWps, " tps)")));
|
|
22218
22506
|
});
|
|
22219
22507
|
}
|
|
22220
22508
|
});
|
|
@@ -22291,7 +22579,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
22291
22579
|
--playground Launch in Playground mode (fixed session, CWD: DATA_DIR/playground)
|
|
22292
22580
|
--update check Check for new updates
|
|
22293
22581
|
--update check latest Show the latest version available on npm
|
|
22294
|
-
--update latest
|
|
22582
|
+
--update [latest] Update the app to the latest version (latest is default)`);
|
|
22295
22583
|
process.exit(0);
|
|
22296
22584
|
}
|
|
22297
22585
|
if (isHelpCommands) {
|
|
@@ -22328,7 +22616,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
22328
22616
|
process.exit(0);
|
|
22329
22617
|
}
|
|
22330
22618
|
if (isUpdate) {
|
|
22331
|
-
const subArg = args[1];
|
|
22619
|
+
const subArg = args[1] || "latest";
|
|
22332
22620
|
if (subArg === "check") {
|
|
22333
22621
|
const checkLatest = args[2] === "latest";
|
|
22334
22622
|
try {
|
|
@@ -22435,7 +22723,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
22435
22723
|
manager = settings?.systemSettings?.updateManager || settings?.updateManager;
|
|
22436
22724
|
} catch (e) {
|
|
22437
22725
|
}
|
|
22438
|
-
if (
|
|
22726
|
+
if (!manager) {
|
|
22439
22727
|
const result = await promptPackageManager();
|
|
22440
22728
|
manager = result.manager;
|
|
22441
22729
|
customCommand = result.customCommand;
|
|
@@ -22457,7 +22745,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
|
|
|
22457
22745
|
}
|
|
22458
22746
|
process.exit(0);
|
|
22459
22747
|
} else {
|
|
22460
|
-
console.error("Unknown update command. Available options: --update check, --update check latest, --update latest");
|
|
22748
|
+
console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest");
|
|
22461
22749
|
process.exit(1);
|
|
22462
22750
|
}
|
|
22463
22751
|
}
|
package/model_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 0,
|
|
3
|
-
"release":
|
|
3
|
+
"release": 20260728,
|
|
4
4
|
"fallbacks": {
|
|
5
5
|
"janitor_default": "gemini-3.1-flash-lite",
|
|
6
6
|
"janitor_attempts_fallback": "gemma-4-26b-a4b-it",
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"deepseek_fast_fallback": "deepseek-chat",
|
|
10
10
|
"deepseek_level_1": "deepseek-v4-flash",
|
|
11
11
|
"deepseek_level_2": "deepseek-v4-pro",
|
|
12
|
+
"mistral_janitor_fallback": "mistral-small-2506",
|
|
13
|
+
"mistral_level_1": "mistral-medium-2505",
|
|
12
14
|
"nvidia_janitor_fallback": "mistralai/mistral-nemotron",
|
|
13
15
|
"nvidia_chat_summarizer_fallback": "deepseek-ai/deepseek-v4-flash",
|
|
14
16
|
"google_level_1": "gemini-3-flash-preview",
|
|
@@ -18,6 +20,74 @@
|
|
|
18
20
|
"gemma_janitor_fallback_google": "gemma-4-26b-a4b-it"
|
|
19
21
|
},
|
|
20
22
|
"providers": {
|
|
23
|
+
"Mistral": {
|
|
24
|
+
"default_free": "mistral-small-2506",
|
|
25
|
+
"default_paid": "devstral-2512",
|
|
26
|
+
"models": {
|
|
27
|
+
"Free": [
|
|
28
|
+
{
|
|
29
|
+
"cmd": "--- Mistral Models ---",
|
|
30
|
+
"desc": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"cmd": "open-mistral-nemo",
|
|
34
|
+
"multimodal": false,
|
|
35
|
+
"desc": "Cost Saving (Text Only) [EXPERIMENTAL]"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"cmd": "mistral-small-2506",
|
|
39
|
+
"multimodal": false,
|
|
40
|
+
"desc": "Cost Saving (Text Only) [Experimental]"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"cmd": "devstral-2512",
|
|
44
|
+
"multimodal": false,
|
|
45
|
+
"desc": "Devstral Coding (Text Only) [EXPERIMENTAL]"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"cmd": "mistral-medium-2505",
|
|
49
|
+
"multimodal": true,
|
|
50
|
+
"desc": "Mistral Medium (Multimodal)"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"cmd": "labs-leanstral-1-5-1",
|
|
54
|
+
"multimodal": false,
|
|
55
|
+
"desc": "Enable Lab Models to access (Text Only) [EXPERIMENTAL]"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"Paid": [
|
|
59
|
+
{
|
|
60
|
+
"cmd": "--- Mistral Models ---",
|
|
61
|
+
"desc": ""
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"cmd": "open-mistral-nemo",
|
|
65
|
+
"multimodal": false,
|
|
66
|
+
"desc": "Cost Saving (Text Only) [EXPERIMENTAL]"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"cmd": "mistral-small-2506",
|
|
70
|
+
"multimodal": false,
|
|
71
|
+
"desc": "Cost Saving (Text Only) [Experimental]"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"cmd": "devstral-2512",
|
|
75
|
+
"multimodal": false,
|
|
76
|
+
"desc": "Devstral Coding (Text Only) [EXPERIMENTAL]"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"cmd": "mistral-medium-2505",
|
|
80
|
+
"multimodal": true,
|
|
81
|
+
"desc": "Mistral Medium (Multimodal)"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"cmd": "labs-leanstral-1-5-1",
|
|
85
|
+
"multimodal": false,
|
|
86
|
+
"desc": "Enable Lab Models to access (Text Only) [EXPERIMENTAL]"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
21
91
|
"OpenRouter": {
|
|
22
92
|
"default_free": "google/gemma-4-31b-it:free",
|
|
23
93
|
"default_paid": "deepseek/deepseek-v4-flash",
|
|
@@ -41,6 +111,11 @@
|
|
|
41
111
|
"multimodal": true,
|
|
42
112
|
"desc": "Multimodal"
|
|
43
113
|
},
|
|
114
|
+
{
|
|
115
|
+
"cmd": "google/gemma-4-26b-a4b-it:free",
|
|
116
|
+
"multimodal": true,
|
|
117
|
+
"desc": "Multimodal"
|
|
118
|
+
},
|
|
44
119
|
{
|
|
45
120
|
"cmd": "\n--- PoolSide Models ---",
|
|
46
121
|
"desc": ""
|
|
@@ -112,6 +187,11 @@
|
|
|
112
187
|
"multimodal": true,
|
|
113
188
|
"desc": "Multimodal"
|
|
114
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"cmd": "anthropic/claude-opus-5",
|
|
192
|
+
"multimodal": true,
|
|
193
|
+
"desc": "Multimodal"
|
|
194
|
+
},
|
|
115
195
|
{
|
|
116
196
|
"cmd": "\n--- DeepSeek Models ---",
|
|
117
197
|
"desc": ""
|
|
@@ -299,11 +379,6 @@
|
|
|
299
379
|
"multimodal": true,
|
|
300
380
|
"desc": "Multimodal"
|
|
301
381
|
},
|
|
302
|
-
{
|
|
303
|
-
"cmd": "mistralai/mistral-small-4-119b-2603",
|
|
304
|
-
"multimodal": true,
|
|
305
|
-
"desc": "Multimodal"
|
|
306
|
-
},
|
|
307
382
|
{
|
|
308
383
|
"cmd": "\n--- OpenAI Models ---",
|
|
309
384
|
"desc": ""
|
|
@@ -382,15 +457,6 @@
|
|
|
382
457
|
"cmd": "meta/llama-3.2-90b-vision-instruct",
|
|
383
458
|
"multimodal": true,
|
|
384
459
|
"desc": "Multimodal"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"cmd": "\n--- ByteDance Models ---",
|
|
388
|
-
"desc": ""
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"cmd": "bytedance/seed-oss-36b-instruct",
|
|
392
|
-
"multimodal": false,
|
|
393
|
-
"desc": "Text Only"
|
|
394
460
|
}
|
|
395
461
|
],
|
|
396
462
|
"Paid": [
|
|
@@ -445,11 +511,6 @@
|
|
|
445
511
|
"multimodal": true,
|
|
446
512
|
"desc": "Multimodal"
|
|
447
513
|
},
|
|
448
|
-
{
|
|
449
|
-
"cmd": "mistralai/mistral-small-4-119b-2603",
|
|
450
|
-
"multimodal": true,
|
|
451
|
-
"desc": "Multimodal"
|
|
452
|
-
},
|
|
453
514
|
{
|
|
454
515
|
"cmd": "\n--- OpenAI Models ---",
|
|
455
516
|
"desc": ""
|
|
@@ -528,15 +589,6 @@
|
|
|
528
589
|
"cmd": "meta/llama-3.2-90b-vision-instruct",
|
|
529
590
|
"multimodal": true,
|
|
530
591
|
"desc": "Multimodal"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"cmd": "\n--- ByteDance Models ---",
|
|
534
|
-
"desc": ""
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"cmd": "bytedance/seed-oss-36b-instruct",
|
|
538
|
-
"multimodal": false,
|
|
539
|
-
"desc": "Text Only"
|
|
540
592
|
}
|
|
541
593
|
]
|
|
542
594
|
}
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fluxflow-cli",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"date": "2026-07-
|
|
5
|
-
"description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"ai",
|
|
8
|
-
"agent",
|
|
9
|
-
"terminal",
|
|
10
|
-
"cli",
|
|
11
|
-
"gemini",
|
|
12
|
-
"ink",
|
|
13
|
-
"flux",
|
|
14
|
-
"fluxflow"
|
|
15
|
-
],
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/KushalRoyChowdhury/fluxflow-cli.git"
|
|
20
|
-
},
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=20",
|
|
23
|
-
"vscode": "^1.90.0"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"dist",
|
|
27
|
-
"README.md",
|
|
28
|
-
"package.json",
|
|
29
|
-
"ARCHITECTURE.md",
|
|
30
|
-
"TOOLS.md",
|
|
31
|
-
"UI_FEATURES.md",
|
|
32
|
-
"cat.txt",
|
|
33
|
-
".puppeteerrc.cjs",
|
|
34
|
-
"flux-flow.cjs",
|
|
35
|
-
"model_config.json"
|
|
36
|
-
],
|
|
37
|
-
"type": "module",
|
|
38
|
-
"bin": {
|
|
39
|
-
"fluxflow-cli": "dist/fluxflow.js",
|
|
40
|
-
"fluxflow": "dist/fluxflow.js"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"start": "tsx ./src/cli.jsx",
|
|
44
|
-
"build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --outfile=./dist/fluxflow.js --external:react --external:ink --external:chalk --external:fs-extra --external:gradient-string --external:ink-text-input --external:ink-select-input --external:@google/genai --external:zod --external:nanoid --external:puppeteer --external:pdf-lib --external:node-pty --external:html-to-docx --external:typescript --external:ws --external:web-tree-sitter --external:diff"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@google/genai": "^1.52.0",
|
|
48
|
-
"chalk": "^5.6.2",
|
|
49
|
-
"diff": "^9.0.0",
|
|
50
|
-
"fs-extra": "^11.3.4",
|
|
51
|
-
"gradient-string": "^3.0.0",
|
|
52
|
-
"html-to-docx": "^1.8.0",
|
|
53
|
-
"ink": "^7.0.1",
|
|
54
|
-
"ink-gradient": "^4.0.1",
|
|
55
|
-
"ink-select-input": "^6.2.0",
|
|
56
|
-
"ink-spinner": "^5.0.0",
|
|
57
|
-
"ink-text-input": "^6.0.0",
|
|
58
|
-
"nanoid": "^5.1.9",
|
|
59
|
-
"node-pty": "^1.1.0",
|
|
60
|
-
"pdf-lib": "^1.17.1",
|
|
61
|
-
"puppeteer": "24.43.1",
|
|
62
|
-
"react": "^19.2.5",
|
|
63
|
-
"web-tree-sitter": "^0.25.10",
|
|
64
|
-
"ws": "^8.21.0",
|
|
65
|
-
"zod": "^4.3.6"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"@types/react": "^19.2.14",
|
|
69
|
-
"esbuild": "^0.28.0",
|
|
70
|
-
"tsx": "^4.21.0"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "fluxflow-cli",
|
|
3
|
+
"version": "3.12.0",
|
|
4
|
+
"date": "2026-07-28",
|
|
5
|
+
"description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"ai",
|
|
8
|
+
"agent",
|
|
9
|
+
"terminal",
|
|
10
|
+
"cli",
|
|
11
|
+
"gemini",
|
|
12
|
+
"ink",
|
|
13
|
+
"flux",
|
|
14
|
+
"fluxflow"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/KushalRoyChowdhury/fluxflow-cli.git"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20",
|
|
23
|
+
"vscode": "^1.90.0"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"package.json",
|
|
29
|
+
"ARCHITECTURE.md",
|
|
30
|
+
"TOOLS.md",
|
|
31
|
+
"UI_FEATURES.md",
|
|
32
|
+
"cat.txt",
|
|
33
|
+
".puppeteerrc.cjs",
|
|
34
|
+
"flux-flow.cjs",
|
|
35
|
+
"model_config.json"
|
|
36
|
+
],
|
|
37
|
+
"type": "module",
|
|
38
|
+
"bin": {
|
|
39
|
+
"fluxflow-cli": "dist/fluxflow.js",
|
|
40
|
+
"fluxflow": "dist/fluxflow.js"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"start": "tsx ./src/cli.jsx",
|
|
44
|
+
"build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --outfile=./dist/fluxflow.js --external:react --external:ink --external:chalk --external:fs-extra --external:gradient-string --external:ink-text-input --external:ink-select-input --external:@google/genai --external:zod --external:nanoid --external:puppeteer --external:pdf-lib --external:node-pty --external:html-to-docx --external:typescript --external:ws --external:web-tree-sitter --external:diff"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@google/genai": "^1.52.0",
|
|
48
|
+
"chalk": "^5.6.2",
|
|
49
|
+
"diff": "^9.0.0",
|
|
50
|
+
"fs-extra": "^11.3.4",
|
|
51
|
+
"gradient-string": "^3.0.0",
|
|
52
|
+
"html-to-docx": "^1.8.0",
|
|
53
|
+
"ink": "^7.0.1",
|
|
54
|
+
"ink-gradient": "^4.0.1",
|
|
55
|
+
"ink-select-input": "^6.2.0",
|
|
56
|
+
"ink-spinner": "^5.0.0",
|
|
57
|
+
"ink-text-input": "^6.0.0",
|
|
58
|
+
"nanoid": "^5.1.9",
|
|
59
|
+
"node-pty": "^1.1.0",
|
|
60
|
+
"pdf-lib": "^1.17.1",
|
|
61
|
+
"puppeteer": "24.43.1",
|
|
62
|
+
"react": "^19.2.5",
|
|
63
|
+
"web-tree-sitter": "^0.25.10",
|
|
64
|
+
"ws": "^8.21.0",
|
|
65
|
+
"zod": "^4.3.6"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/react": "^19.2.14",
|
|
69
|
+
"esbuild": "^0.28.0",
|
|
70
|
+
"tsx": "^4.21.0"
|
|
71
|
+
}
|
|
72
|
+
}
|