fluxflow-cli 2.11.2 → 2.11.4

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 +51 -6
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -8740,7 +8740,9 @@ ${ideErr} [/ERROR]`;
8740
8740
  if (splitPoint !== -1) break;
8741
8741
  }
8742
8742
  if (splitPoint !== -1) {
8743
- if (splitPoint > 0) msgs.push({ type: "text", content: remaining.substring(0, splitPoint) });
8743
+ if (splitPoint > 0) {
8744
+ msgs.push({ type: "text", content: remaining.substring(0, splitPoint) });
8745
+ }
8744
8746
  isBufferingToolCall = true;
8745
8747
  toolCallBuffer = remaining.substring(splitPoint);
8746
8748
  remaining = "";
@@ -8763,14 +8765,53 @@ ${ideErr} [/ERROR]`;
8763
8765
  break;
8764
8766
  }
8765
8767
  }
8766
- const endIdx = combined.indexOf(endTag);
8768
+ let endIdx = -1;
8769
+ if (activeBufferType === "tool") {
8770
+ let balance = 0;
8771
+ let inString = null;
8772
+ let bracketBalance = 0;
8773
+ let passedParen = false;
8774
+ for (let i = 0; i < combined.length; i++) {
8775
+ const char = combined[i];
8776
+ if (inString) {
8777
+ if (char === inString) {
8778
+ let backslashCount = 0;
8779
+ for (let j = i - 1; j >= 0 && combined[j] === "\\"; j--) {
8780
+ backslashCount++;
8781
+ }
8782
+ if (backslashCount % 2 === 0) {
8783
+ inString = null;
8784
+ }
8785
+ }
8786
+ } else {
8787
+ if (char === '"' || char === "'" || char === "`") {
8788
+ inString = char;
8789
+ } else if (char === "(") {
8790
+ balance++;
8791
+ passedParen = true;
8792
+ } else if (char === ")") {
8793
+ balance--;
8794
+ } else if (char === "[") {
8795
+ bracketBalance++;
8796
+ } else if (char === "]") {
8797
+ if (passedParen && balance === 0 && bracketBalance === 1) {
8798
+ endIdx = i;
8799
+ break;
8800
+ }
8801
+ bracketBalance--;
8802
+ }
8803
+ }
8804
+ }
8805
+ } else {
8806
+ endIdx = combined.indexOf(endTag);
8807
+ }
8767
8808
  if (endIdx !== -1) {
8768
- const fullMatch = combined.substring(0, endIdx + endTag.length);
8809
+ const fullMatch = combined.substring(0, endIdx + 1);
8769
8810
  msgs.push({ type: "text", content: fullMatch });
8770
8811
  toolCallBuffer = "";
8771
8812
  isBufferingToolCall = false;
8772
8813
  activeBufferType = null;
8773
- remaining = combined.substring(endIdx + endTag.length);
8814
+ remaining = combined.substring(endIdx + 1);
8774
8815
  } else {
8775
8816
  const MAX_BUFFER = 512;
8776
8817
  if (combined.length > MAX_BUFFER) {
@@ -8852,6 +8893,7 @@ ${ideErr} [/ERROR]`;
8852
8893
  if (aiProvider === "Google") {
8853
8894
  pendingGoogleText += dedupeClean;
8854
8895
  } else {
8896
+ yield* flushGoogleBuffer2();
8855
8897
  const msgs = getBufferedMessages(dedupeClean);
8856
8898
  for (const m of msgs) yield m;
8857
8899
  }
@@ -8866,6 +8908,7 @@ ${ideErr} [/ERROR]`;
8866
8908
  if (aiProvider === "Google") {
8867
8909
  pendingGoogleText += chunkText;
8868
8910
  } else {
8911
+ yield* flushGoogleBuffer2();
8869
8912
  const msgs = getBufferedMessages(chunkText);
8870
8913
  for (const m of msgs) yield m;
8871
8914
  }
@@ -9877,6 +9920,7 @@ ${boxBottom}` };
9877
9920
  toolCallPointer++;
9878
9921
  }
9879
9922
  if (aiProvider === "Google" && pendingGoogleText && Date.now() - lastGoogleFlushTime >= 150) {
9923
+ yield* flushGoogleBuffer2();
9880
9924
  const msgs = getBufferedMessages(pendingGoogleText);
9881
9925
  for (const m of msgs) yield m;
9882
9926
  pendingGoogleText = "";
@@ -9921,6 +9965,7 @@ ${boxBottom}` };
9921
9965
  if (aiProvider === "Google") {
9922
9966
  pendingGoogleText += dedupeClean;
9923
9967
  } else {
9968
+ yield* flushGoogleBuffer2();
9924
9969
  const msgs = getBufferedMessages(dedupeClean);
9925
9970
  for (const m of msgs) yield m;
9926
9971
  }
@@ -12351,8 +12396,8 @@ function App({ args = [] }) {
12351
12396
  cmd: "/budget",
12352
12397
  desc: "Set or View budget limits",
12353
12398
  subs: [
12354
- { cmd: "Set", desc: "Configure budgets (Daily/Monthly limits)" },
12355
- { cmd: "View", desc: "View current usage budget bars" }
12399
+ { cmd: "view", desc: "View current usage budget bars" },
12400
+ { cmd: "set", desc: "Configure budgets (Daily/Monthly limits)" }
12356
12401
  ]
12357
12402
  },
12358
12403
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "2.11.2",
3
+ "version": "2.11.4",
4
4
  "date": "2026-06-23",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [