@nomad-e/bluma-cli 0.1.49 → 0.1.51

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 +14 -10
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -507,7 +507,7 @@ import { spawn as spawn5 } from "child_process";
507
507
  import { v4 as uuidv47 } from "uuid";
508
508
 
509
509
  // src/app/ui/App.tsx
510
- import { useState as useState8, useEffect as useEffect8, useRef as useRef6, useCallback as useCallback3, memo as memo15, useMemo as useMemo2 } from "react";
510
+ import { useState as useState8, useEffect as useEffect8, useRef as useRef6, useCallback as useCallback3, memo as memo15 } from "react";
511
511
  import { Box as Box23, Text as Text22, Static } from "ink";
512
512
 
513
513
  // src/app/ui/layout.tsx
@@ -14612,7 +14612,8 @@ var AskUserQuestionPrompt = memo14(AskUserQuestionPromptComponent);
14612
14612
 
14613
14613
  // src/app/ui/App.tsx
14614
14614
  import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
14615
- var MAX_STATIC_HISTORY_ITEMS = 220;
14615
+ var HISTORY_EMERGENCY_LIMIT = 3;
14616
+ var HISTORY_KEEP_AFTER_CLEANUP = 3;
14616
14617
  var blumaUpdateRegistryCheckStarted = false;
14617
14618
  function nextHistoryId(items) {
14618
14619
  if (items.length === 0) return HEADER_PANEL_HISTORY_ID + 1;
@@ -15010,13 +15011,16 @@ Please use command_status to check the result and report back to the user.`;
15010
15011
  ];
15011
15012
  });
15012
15013
  }, []);
15013
- const cappedHistory = useMemo2(() => {
15014
- if (history.length <= MAX_STATIC_HISTORY_ITEMS) return history;
15015
- const header = history.find((h) => h.id === HEADER_PANEL_HISTORY_ID);
15016
- const rest = history.filter((h) => h.id !== HEADER_PANEL_HISTORY_ID);
15017
- const tail = rest.slice(-(MAX_STATIC_HISTORY_ITEMS - 1));
15018
- return header ? [header, ...tail] : rest.slice(-MAX_STATIC_HISTORY_ITEMS);
15019
- }, [history]);
15014
+ useEffect8(() => {
15015
+ if (history.length >= HISTORY_EMERGENCY_LIMIT) {
15016
+ setHistory((prev) => {
15017
+ const header = prev.find((h) => h.id === HEADER_PANEL_HISTORY_ID);
15018
+ const rest = prev.filter((h) => h.id !== HEADER_PANEL_HISTORY_ID);
15019
+ const tail = rest.slice(-HISTORY_KEEP_AFTER_CLEANUP);
15020
+ return header ? [header, ...tail] : tail;
15021
+ });
15022
+ }
15023
+ }, [history.length]);
15020
15024
  useEffect8(() => {
15021
15025
  const initializeAgent = async () => {
15022
15026
  try {
@@ -15329,7 +15333,7 @@ Please use command_status to check the result and report back to the user.`;
15329
15333
  ] });
15330
15334
  };
15331
15335
  return /* @__PURE__ */ jsxs22(Box23, { flexDirection: "column", children: [
15332
- /* @__PURE__ */ jsx24(Static, { items: cappedHistory, children: (item) => /* @__PURE__ */ jsx24(Box23, { children: item.component }, item.id) }),
15336
+ /* @__PURE__ */ jsx24(Static, { items: history, children: (item) => /* @__PURE__ */ jsx24(Box23, { children: item.component }, item.id) }),
15333
15337
  liveToolName ? /* @__PURE__ */ jsx24(Box23, { paddingLeft: 2, marginBottom: 0, children: /* @__PURE__ */ jsxs22(Text22, { dimColor: true, children: [
15334
15338
  /* @__PURE__ */ jsxs22(Text22, { color: BLUMA_TERMINAL.brandMagenta, bold: true, children: [
15335
15339
  "*",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",