@nomad-e/bluma-cli 0.1.2 → 0.1.5

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/main.js +19 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -5916,7 +5916,7 @@ var WorkingTimerComponent = ({ eventBus: eventBus2, taskName, taskStatus }) => {
5916
5916
  useEffect4(() => {
5917
5917
  const shineTimer = setInterval(() => {
5918
5918
  setShinePosition((prev) => (prev + 1) % 30);
5919
- }, 75);
5919
+ }, 120);
5920
5920
  return () => clearInterval(shineTimer);
5921
5921
  }, []);
5922
5922
  useEffect4(() => {
@@ -6889,20 +6889,37 @@ var StreamingTextComponent = ({ eventBus: eventBus2, onReasoningComplete }) => {
6889
6889
  const [reasoning, setReasoning] = useState6("");
6890
6890
  const [isStreaming, setIsStreaming] = useState6(false);
6891
6891
  const reasoningRef = useRef4("");
6892
+ const lastUpdateRef = useRef4(0);
6893
+ const pendingUpdateRef = useRef4(null);
6892
6894
  useEffect5(() => {
6893
6895
  const handleStart = () => {
6894
6896
  setReasoning("");
6895
6897
  reasoningRef.current = "";
6898
+ lastUpdateRef.current = 0;
6896
6899
  setIsStreaming(true);
6897
6900
  };
6898
6901
  const handleReasoningChunk = (data) => {
6899
6902
  if (data.delta) {
6900
6903
  reasoningRef.current += data.delta;
6901
- setReasoning(reasoningRef.current);
6904
+ const now = Date.now();
6905
+ if (now - lastUpdateRef.current >= 50) {
6906
+ lastUpdateRef.current = now;
6907
+ setReasoning(reasoningRef.current);
6908
+ } else if (!pendingUpdateRef.current) {
6909
+ pendingUpdateRef.current = setTimeout(() => {
6910
+ lastUpdateRef.current = Date.now();
6911
+ setReasoning(reasoningRef.current);
6912
+ pendingUpdateRef.current = null;
6913
+ }, 50 - (now - lastUpdateRef.current));
6914
+ }
6902
6915
  }
6903
6916
  };
6904
6917
  const handleEnd = () => {
6905
6918
  setIsStreaming(false);
6919
+ if (pendingUpdateRef.current) {
6920
+ clearTimeout(pendingUpdateRef.current);
6921
+ pendingUpdateRef.current = null;
6922
+ }
6906
6923
  const finalReasoning = reasoningRef.current;
6907
6924
  if (finalReasoning && onReasoningComplete) {
6908
6925
  onReasoningComplete(finalReasoning);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",