@nomad-e/bluma-cli 0.1.50 → 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.
- package/dist/main.js +6 -13
- 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
|
|
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,8 +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
|
|
14616
|
-
var
|
|
14615
|
+
var HISTORY_EMERGENCY_LIMIT = 3;
|
|
14616
|
+
var HISTORY_KEEP_AFTER_CLEANUP = 3;
|
|
14617
14617
|
var blumaUpdateRegistryCheckStarted = false;
|
|
14618
14618
|
function nextHistoryId(items) {
|
|
14619
14619
|
if (items.length === 0) return HEADER_PANEL_HISTORY_ID + 1;
|
|
@@ -15012,22 +15012,15 @@ Please use command_status to check the result and report back to the user.`;
|
|
|
15012
15012
|
});
|
|
15013
15013
|
}, []);
|
|
15014
15014
|
useEffect8(() => {
|
|
15015
|
-
if (history.length >=
|
|
15015
|
+
if (history.length >= HISTORY_EMERGENCY_LIMIT) {
|
|
15016
15016
|
setHistory((prev) => {
|
|
15017
15017
|
const header = prev.find((h) => h.id === HEADER_PANEL_HISTORY_ID);
|
|
15018
15018
|
const rest = prev.filter((h) => h.id !== HEADER_PANEL_HISTORY_ID);
|
|
15019
|
-
const tail = rest.slice(-
|
|
15019
|
+
const tail = rest.slice(-HISTORY_KEEP_AFTER_CLEANUP);
|
|
15020
15020
|
return header ? [header, ...tail] : tail;
|
|
15021
15021
|
});
|
|
15022
15022
|
}
|
|
15023
15023
|
}, [history.length]);
|
|
15024
|
-
const cappedHistory = useMemo2(() => {
|
|
15025
|
-
if (history.length <= MAX_STATIC_HISTORY_ITEMS) return history;
|
|
15026
|
-
const header = history.find((h) => h.id === HEADER_PANEL_HISTORY_ID);
|
|
15027
|
-
const rest = history.filter((h) => h.id !== HEADER_PANEL_HISTORY_ID);
|
|
15028
|
-
const tail = rest.slice(-(MAX_STATIC_HISTORY_ITEMS - 1));
|
|
15029
|
-
return header ? [header, ...tail] : rest.slice(-MAX_STATIC_HISTORY_ITEMS);
|
|
15030
|
-
}, [history]);
|
|
15031
15024
|
useEffect8(() => {
|
|
15032
15025
|
const initializeAgent = async () => {
|
|
15033
15026
|
try {
|
|
@@ -15340,7 +15333,7 @@ Please use command_status to check the result and report back to the user.`;
|
|
|
15340
15333
|
] });
|
|
15341
15334
|
};
|
|
15342
15335
|
return /* @__PURE__ */ jsxs22(Box23, { flexDirection: "column", children: [
|
|
15343
|
-
/* @__PURE__ */ jsx24(Static, { items:
|
|
15336
|
+
/* @__PURE__ */ jsx24(Static, { items: history, children: (item) => /* @__PURE__ */ jsx24(Box23, { children: item.component }, item.id) }),
|
|
15344
15337
|
liveToolName ? /* @__PURE__ */ jsx24(Box23, { paddingLeft: 2, marginBottom: 0, children: /* @__PURE__ */ jsxs22(Text22, { dimColor: true, children: [
|
|
15345
15338
|
/* @__PURE__ */ jsxs22(Text22, { color: BLUMA_TERMINAL.brandMagenta, bold: true, children: [
|
|
15346
15339
|
"*",
|