fluxflow-cli 1.18.16 → 1.18.17

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 +54 -13
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -4674,7 +4674,23 @@ var init_generate_image = __esm({
4674
4674
  await RevertManager.recordFileChange(absolutePath);
4675
4675
  await fs15.writeFile(absolutePath, finalBuffer);
4676
4676
  await recordImageGeneration(settings);
4677
- return `SUCCESS: Image successfully generated from prompt [${prompt}] and saved to [${outputPath}].`;
4677
+ const ext = path14.extname(outputPath).toLowerCase();
4678
+ const mimeMap = {
4679
+ ".jpg": "image/jpeg",
4680
+ ".jpeg": "image/jpeg",
4681
+ ".png": "image/png",
4682
+ ".webp": "image/webp"
4683
+ };
4684
+ const mimeType = mimeMap[ext] || "image/png";
4685
+ return {
4686
+ text: `SUCCESS: Image successfully generated from prompt [${prompt}] and saved to [${outputPath}]. Output attached to multimodal part`,
4687
+ binaryPart: {
4688
+ inlineData: {
4689
+ data: finalBuffer.toString("base64"),
4690
+ mimeType
4691
+ }
4692
+ }
4693
+ };
4678
4694
  } catch (err) {
4679
4695
  return `ERROR: Failed during image generation: ${err.message}`;
4680
4696
  }
@@ -5730,10 +5746,13 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5730
5746
  accumulatedContext = "";
5731
5747
  }
5732
5748
  }
5733
- const contents = modifiedHistory.filter((msg) => (msg.role === "user" || msg.role === "agent" || msg.role === "system") && !String(msg.id).startsWith("welcome") && !msg.isMeta && !msg.isTerminalRecord && !(msg.text && msg.text.startsWith("[TERMINAL_RECORD]"))).map((msg) => {
5749
+ const contents = modifiedHistory.filter((msg) => (msg.role === "user" || msg.role === "agent" || msg.role === "system") && !String(msg.id).startsWith("welcome") && !msg.isMeta && !msg.isTerminalRecord && !(msg.text && msg.text.startsWith("[TERMINAL_RECORD]"))).map((msg, idx, arr) => {
5734
5750
  const parts = [{ text: msg.text }];
5735
5751
  if (msg.binaryPart) {
5736
- parts.push(msg.binaryPart);
5752
+ const physicalUserTurnsAfter = arr.slice(idx + 1).filter((m) => m.role === "user" && !m.text?.startsWith("[TOOL RESULT]")).length;
5753
+ if (physicalUserTurnsAfter <= 4) {
5754
+ parts.push(msg.binaryPart);
5755
+ }
5737
5756
  }
5738
5757
  return {
5739
5758
  role: msg.role === "user" || msg.role === "system" ? "user" : "model",
@@ -5741,7 +5760,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5741
5760
  };
5742
5761
  });
5743
5762
  if (!await checkQuota("agent", settings)) {
5744
- throw new Error("Error: Daily Quota Exausted for Agent");
5763
+ throw new Error("Error: Quota Exausted for Agent");
5745
5764
  }
5746
5765
  let targetModel = modelName;
5747
5766
  if (retryCount === MAX_RETRIES - 1) {
@@ -5785,7 +5804,8 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5785
5804
  { category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, threshold: HarmBlockThreshold.BLOCK_NONE },
5786
5805
  { category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, threshold: HarmBlockThreshold.BLOCK_NONE }
5787
5806
  ],
5788
- thinkingConfig: { includeThoughts: false, thinkingLevel: targetModel.includes("pro") ? ThinkingLevel.HIGH : ThinkingLevel.MINIMAL }
5807
+ thinkingConfig: { includeThoughts: false, thinkingLevel: ThinkingLevel.MINIMAL }
5808
+ // Optimized for Gemma 4.
5789
5809
  }
5790
5810
  });
5791
5811
  if (addedMarker && contents[contents.length - 1]?.parts?.[0]) {
@@ -7135,19 +7155,31 @@ function App({ args = [] }) {
7135
7155
  const [isTerminalFocused, setIsTerminalFocused] = useState10(false);
7136
7156
  const [tick, setTick] = useState10(0);
7137
7157
  useEffect7(() => {
7138
- if (apiTier !== "Free" && activeModel === "gemma-4-31b-it") {
7158
+ const s = emojiSpace(2);
7159
+ if (apiTier === "Free") {
7160
+ setActiveModel("gemma-4-31b-it");
7161
+ setMessages((prev) => {
7162
+ setCompletedIndex(prev.length + 1);
7163
+ return [...prev, {
7164
+ id: "tier-switch-" + Date.now(),
7165
+ role: "system",
7166
+ text: `\u26A0\uFE0F${s}**[TIER LIMIT]** Auto-switched to Gemma (Free default).`,
7167
+ isMeta: true
7168
+ }];
7169
+ });
7170
+ } else {
7139
7171
  setActiveModel("gemini-3-flash-preview");
7140
7172
  setMessages((prev) => {
7141
7173
  setCompletedIndex(prev.length + 1);
7142
7174
  return [...prev, {
7143
7175
  id: "tier-switch-" + Date.now(),
7144
7176
  role: "system",
7145
- text: `\u26A0\uFE0F **[TIER LIMIT]** Gemma is only available on Free API tier. Auto-switched to Gemini 3 Flash Preview.`,
7177
+ text: `\u26A0\uFE0F${s}**[TIER LIMIT]** Auto-switched to Gemini 3 Flash Preview.`,
7146
7178
  isMeta: true
7147
7179
  }];
7148
7180
  });
7149
7181
  }
7150
- }, [apiTier, activeModel]);
7182
+ }, [apiTier]);
7151
7183
  const terminalEnv = useMemo2(() => {
7152
7184
  const isIDE = process.env.TERM_PROGRAM === "vscode" || !!process.env.VSC_TERMINAL_URL || !!process.env.INTELLIJ_TERMINAL_COMMAND_BLOCKS;
7153
7185
  return {
@@ -7647,11 +7679,20 @@ function App({ args = [] }) {
7647
7679
  {
7648
7680
  cmd: "/model",
7649
7681
  desc: "Switch AI model",
7650
- subs: [
7651
- { cmd: "gemma-4-31b-it", desc: apiTier === "Free" ? "Standard Default (Free, Recommended)" : "Standard Default (Free, Recommended) - Use Free API Key to use this model " },
7652
- { cmd: "gemini-3.1-pro-preview", desc: "Most Capable (Paid)" },
7653
- { cmd: "gemini-3-flash-preview", desc: "Fast & Lightweight (Paid, Limited Free quota)" },
7654
- { cmd: "gemini-3.5-flash", desc: "New (Paid, Limited Free quota)" }
7682
+ subs: apiTier === "Free" ? [
7683
+ {
7684
+ cmd: "gemma-4-31b-it",
7685
+ desc: "Standard Default (Free, Recommended)"
7686
+ }
7687
+ ] : [
7688
+ {
7689
+ cmd: "gemini-3-flash-preview",
7690
+ desc: "Fast & Lightweight (Paid, Limited Free quota)"
7691
+ },
7692
+ {
7693
+ cmd: "gemini-3.5-flash",
7694
+ desc: "New (Paid, Limited Free quota)"
7695
+ }
7655
7696
  ]
7656
7697
  },
7657
7698
  { cmd: "/settings", desc: "Configure system prefs" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.18.16",
3
+ "version": "1.18.17",
4
4
  "date": "2026-06-01",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [