fluxflow-cli 2.11.4 → 2.11.6

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.
Files changed (2) hide show
  1. package/dist/fluxflow.js +40 -23
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -3474,6 +3474,7 @@ ${projectContextBlock}
3474
3474
  -- FORMATTING --
3475
3475
  - GFM Supported
3476
3476
  - NO CHAT **AFTER** FIRING TOOLS IN THIS TURN
3477
+ - End final response with summary of changes made and files edited
3477
3478
  - Basic LaTeX${mode === "Flux" ? "" : ". Kaomojis"}
3478
3479
  === END SYSTEM PROMPT ===`.trim();
3479
3480
  };
@@ -5022,9 +5023,10 @@ ${lines.map((l, i) => `${i + 1} | ${l}`).join("\n")}
5022
5023
  }
5023
5024
  const strip = (t) => t.replace(/^```[\w]*\n?/, "").replace(/```\s*$/, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
5024
5025
  const processedContent = strip(content);
5025
- const lineCount = processedContent.split(/\r?\n/).length;
5026
- const originalSize = Buffer.byteLength(processedContent, "utf8");
5027
- fs10.writeFileSync(absolutePath, processedContent, "utf8");
5026
+ const finalContent = processedContent.endsWith("\n") ? processedContent : processedContent + "\n";
5027
+ const lineCount = finalContent.split(/\r?\n/).length;
5028
+ const originalSize = Buffer.byteLength(finalContent, "utf8");
5029
+ fs10.writeFileSync(absolutePath, finalContent, "utf8");
5028
5030
  let verifiedContent = fs10.readFileSync(absolutePath, "utf8");
5029
5031
  const verifiedSize = Buffer.byteLength(verifiedContent, "utf8");
5030
5032
  const verifiedLines = verifiedContent.split(/\r?\n/);
@@ -6593,7 +6595,7 @@ var init_ai = __esm({
6593
6595
  }
6594
6596
  return fetch(url, options);
6595
6597
  };
6596
- getDeepSeekStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal) {
6598
+ getDeepSeekStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal, temperature = 0.9) {
6597
6599
  const messages = [];
6598
6600
  if (systemInstruction) {
6599
6601
  messages.push({ role: "system", content: systemInstruction });
@@ -6632,7 +6634,8 @@ var init_ai = __esm({
6632
6634
  model,
6633
6635
  messages,
6634
6636
  stream: true,
6635
- stream_options: { include_usage: true }
6637
+ stream_options: { include_usage: true },
6638
+ temperature
6636
6639
  };
6637
6640
  if (thinkingLevel !== "Fast") {
6638
6641
  const reasoningEffortMap = {
@@ -6724,7 +6727,7 @@ var init_ai = __esm({
6724
6727
  }
6725
6728
  }
6726
6729
  };
6727
- getNVIDIAStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal = false, signal) {
6730
+ getNVIDIAStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal = false, signal, temperature = 0.8) {
6728
6731
  const messages = [];
6729
6732
  if (systemInstruction) {
6730
6733
  messages.push({ role: "system", content: systemInstruction });
@@ -6778,7 +6781,8 @@ var init_ai = __esm({
6778
6781
  messages,
6779
6782
  max_tokens: maxTokens,
6780
6783
  stream: true,
6781
- stream_options: { include_usage: true }
6784
+ stream_options: { include_usage: true },
6785
+ temperature
6782
6786
  };
6783
6787
  if (isKimi) {
6784
6788
  body.chat_template_kwargs = { thinking: isThinking };
@@ -6875,7 +6879,7 @@ var init_ai = __esm({
6875
6879
  }
6876
6880
  }
6877
6881
  };
6878
- getOpenRouterStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal) {
6882
+ getOpenRouterStream = async function* (apiKey, model, contents, systemInstruction, thinkingLevel, mode, isMultiModal, signal, temperature = 0.5) {
6879
6883
  const messages = [];
6880
6884
  if (systemInstruction) {
6881
6885
  messages.push({ role: "system", content: systemInstruction });
@@ -6928,7 +6932,8 @@ var init_ai = __esm({
6928
6932
  const requestPayload = {
6929
6933
  model,
6930
6934
  messages,
6931
- stream: true
6935
+ stream: true,
6936
+ temperature
6932
6937
  };
6933
6938
  const effort = reasoningEffortMap[thinkingLevel];
6934
6939
  if (effort && thinkingLevel !== "Fast") {
@@ -7118,7 +7123,10 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7118
7123
  janitorPrompt,
7119
7124
  "Fast",
7120
7125
  // Janitor always minimal
7121
- mode
7126
+ mode,
7127
+ false,
7128
+ null,
7129
+ 0.4
7122
7130
  );
7123
7131
  const iterator2 = stream[Symbol.asyncIterator]();
7124
7132
  const firstResult2 = await iterator2.next();
@@ -7132,7 +7140,9 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7132
7140
  "Fast",
7133
7141
  // Janitor always minimal
7134
7142
  mode,
7135
- false
7143
+ false,
7144
+ null,
7145
+ 0.4
7136
7146
  );
7137
7147
  const iterator2 = stream[Symbol.asyncIterator]();
7138
7148
  const firstResult2 = await iterator2.next();
@@ -7146,7 +7156,9 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7146
7156
  "Fast",
7147
7157
  // Janitor always minimal
7148
7158
  mode,
7149
- false
7159
+ false,
7160
+ null,
7161
+ 0.4
7150
7162
  );
7151
7163
  const iterator2 = stream[Symbol.asyncIterator]();
7152
7164
  const firstResult2 = await iterator2.next();
@@ -7158,7 +7170,7 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7158
7170
  config: {
7159
7171
  systemInstruction: janitorPrompt,
7160
7172
  maxOutputTokens: 512,
7161
- temperature: 0.3,
7173
+ temperature: 0.4,
7162
7174
  safetySettings: [
7163
7175
  { category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
7164
7176
  { category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
@@ -7518,18 +7530,18 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7518
7530
  client = new GoogleGenAI({ apiKey });
7519
7531
  return client;
7520
7532
  };
7521
- generateSimpleContent = async (settings, model, contents, systemInstruction, thinkingLevel = "Fast") => {
7533
+ generateSimpleContent = async (settings, model, contents, systemInstruction, thinkingLevel = "Fast", temperature = 0.4) => {
7522
7534
  const { aiProvider = "Google", apiKey, mode } = settings;
7523
7535
  let fullText = "";
7524
7536
  let usageMetadata = null;
7525
7537
  const normalizedContents = typeof contents === "string" ? [{ role: "user", parts: [{ text: contents }] }] : contents;
7526
7538
  let stream;
7527
7539
  if (aiProvider === "OpenRouter") {
7528
- stream = getOpenRouterStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false);
7540
+ stream = getOpenRouterStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false, null, temperature);
7529
7541
  } else if (aiProvider === "DeepSeek") {
7530
- stream = getDeepSeekStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false);
7542
+ stream = getDeepSeekStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false, null, temperature);
7531
7543
  } else if (aiProvider === "NVIDIA") {
7532
- stream = getNVIDIAStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false);
7544
+ stream = getNVIDIAStream(apiKey, model, normalizedContents, systemInstruction, thinkingLevel, mode, false, null, temperature);
7533
7545
  } else {
7534
7546
  const genStream = await client.models.generateContentStream({
7535
7547
  model,
@@ -7537,7 +7549,7 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7537
7549
  config: {
7538
7550
  systemInstruction,
7539
7551
  maxOutputTokens: 2048,
7540
- temperature: 0.3,
7552
+ temperature,
7541
7553
  thinkingConfig: { includeThoughts: false, thinkingLevel: ThinkingLevel.MINIMAL }
7542
7554
  }
7543
7555
  });
@@ -8605,7 +8617,8 @@ ${ideErr} [/ERROR]`;
8605
8617
  thinkingLevel,
8606
8618
  mode,
8607
8619
  isMultiModal,
8608
- abortController.signal
8620
+ abortController.signal,
8621
+ 0.5
8609
8622
  );
8610
8623
  } else if (aiProvider === "DeepSeek") {
8611
8624
  stream = getDeepSeekStream(
@@ -8616,7 +8629,8 @@ ${ideErr} [/ERROR]`;
8616
8629
  thinkingLevel,
8617
8630
  mode,
8618
8631
  isMultiModal,
8619
- abortController.signal
8632
+ abortController.signal,
8633
+ 0.9
8620
8634
  );
8621
8635
  } else if (aiProvider === "NVIDIA") {
8622
8636
  stream = getNVIDIAStream(
@@ -8627,15 +8641,17 @@ ${ideErr} [/ERROR]`;
8627
8641
  thinkingLevel,
8628
8642
  mode,
8629
8643
  isMultiModal,
8630
- abortController.signal
8644
+ abortController.signal,
8645
+ 0.8
8631
8646
  );
8632
8647
  } else {
8633
8648
  const apiCallPromise = client.models.generateContentStream({
8634
- model: targetModel || "gemma-4-31b-it",
8649
+ model: targetModel || "gemini-3-flash-preview",
8635
8650
  contents: activeContents,
8636
8651
  config: {
8637
8652
  systemInstruction: currentSystemInstruction,
8638
8653
  mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
8654
+ temperature: 1.05,
8639
8655
  safetySettings: [
8640
8656
  { category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
8641
8657
  { category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
@@ -9556,7 +9572,8 @@ ${boxBottom}` };
9556
9572
  diffOpened = true;
9557
9573
  await new Promise((r) => setTimeout(r, 50));
9558
9574
  } else if (normToolName === "write_file") {
9559
- const modifiedContent = toolArgs.content || toolArgs.newContent || "";
9575
+ const rawContent = toolArgs.content || toolArgs.newContent || "";
9576
+ const modifiedContent = rawContent.endsWith("\n") ? rawContent : rawContent + "\n";
9560
9577
  if (!fs20.existsSync(absPath)) {
9561
9578
  isNewFileCreated = true;
9562
9579
  fs20.mkdirSync(path19.dirname(absPath), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "2.11.4",
3
+ "version": "2.11.6",
4
4
  "date": "2026-06-23",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [