fluxflow-cli 2.8.1 → 2.8.3

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 +25 -3
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -3407,7 +3407,7 @@ Check these first; These Files > Training Data. Safety rules apply
3407
3407
  const projectContextBlock = cachedProjectContextBlock;
3408
3408
  return `${nameStr}${nicknameStr}${userInstrStr}=== SYSTEM PROMPT ===
3409
3409
  Identity: Flux Flow (by Kushal Roy Chowdhury). ${mode === "Flux" ? "Sassy" : "Conversational, Sassy, Friendly, Humorous, Sarcastic"}, CLI Agent
3410
- Mode: ${mode}${thinkingLevel !== "Fast" ? " (Thinking)" : ""}. ${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" : "Concise"}
3410
+ Mode: ${mode}${thinkingLevel !== "Fast" ? " (Thinking)" : ""}. ${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"}
3411
3411
 
3412
3412
  -- MARKERS --
3413
3413
  - TOOL SYSTEM: [TOOL RESULT]
@@ -7048,7 +7048,19 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7048
7048
  }
7049
7049
  if (fullContent) {
7050
7050
  finalSynthesis = fullContent;
7051
- if (lastUsage) await addToUsage("tokens", lastUsage.totalTokenCount || 0, aiProvider, janitorModel || "gemini-3.1-flash-lite");
7051
+ if (lastUsage) {
7052
+ const total = lastUsage.totalTokenCount || 0;
7053
+ const cached = lastUsage.cachedContentTokenCount || 0;
7054
+ const candidates = (lastUsage.candidatesTokenCount || 0) + (lastUsage.thoughtsTokenCount || 0);
7055
+ const jModel = janitorModel || "gemini-3.1-flash-lite";
7056
+ await addToUsage("tokens", total, aiProvider, jModel);
7057
+ if (cached > 0) {
7058
+ await addToUsage("cachedTokens", cached, aiProvider, jModel);
7059
+ }
7060
+ if (candidates > 0) {
7061
+ await addToUsage("candidateTokens", candidates, aiProvider, jModel);
7062
+ }
7063
+ }
7052
7064
  } else {
7053
7065
  throw new Error("No synthesis generated by Janitor.");
7054
7066
  }
@@ -7457,7 +7469,17 @@ ${newMemoryListStr}
7457
7469
  }
7458
7470
  }
7459
7471
  if (response.usageMetadata) {
7460
- await addToUsage("tokens", response.usageMetadata.totalTokenCount || 0, aiProvider, targetModel);
7472
+ const meta = response.usageMetadata;
7473
+ const total = meta.totalTokenCount || 0;
7474
+ const cached = meta.cachedContentTokenCount || 0;
7475
+ const candidates = (meta.candidatesTokenCount || 0) + (meta.thoughtsTokenCount || 0);
7476
+ await addToUsage("tokens", total, aiProvider, targetModel);
7477
+ if (cached > 0) {
7478
+ await addToUsage("cachedTokens", cached, aiProvider, targetModel);
7479
+ }
7480
+ if (candidates > 0) {
7481
+ await addToUsage("candidateTokens", candidates, aiProvider, targetModel);
7482
+ }
7461
7483
  }
7462
7484
  success = true;
7463
7485
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "2.8.1",
3
+ "version": "2.8.3",
4
4
  "date": "2026-06-18",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [