@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.
- package/dist/main.js +14 -10
- 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,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
|
|
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
|
-
|
|
15014
|
-
if (history.length
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
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:
|
|
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
|
"*",
|