@nomad-e/bluma-cli 0.0.47 → 0.0.49
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 +274 -120
- package/package.json +5 -2
package/dist/main.js
CHANGED
|
@@ -7,7 +7,7 @@ import { v4 as uuidv42 } from "uuid";
|
|
|
7
7
|
|
|
8
8
|
// src/app/ui/App.tsx
|
|
9
9
|
import { useState as useState5, useEffect as useEffect4, useRef as useRef2, useCallback, memo as memo4 } from "react";
|
|
10
|
-
import { Box as
|
|
10
|
+
import { Box as Box16, Text as Text15, Static } from "ink";
|
|
11
11
|
|
|
12
12
|
// src/app/ui/layout.tsx
|
|
13
13
|
import { Box, Text } from "ink";
|
|
@@ -1705,22 +1705,25 @@ When asked to perform tasks such as fixing bugs, adding features, refactoring, o
|
|
|
1705
1705
|
- Organize your entire reasoning and planning there.
|
|
1706
1706
|
|
|
1707
1707
|
3. USE THE DYNAMIC AND REFLECTIVE PROBLEM-SOLVING TOOL
|
|
1708
|
-
- Break down the task into **
|
|
1708
|
+
- Break down the task into **task_checklist** following this tool's guidelines.
|
|
1709
1709
|
- Use the **thought** field for detailed analysis, revisions, and reasoning.
|
|
1710
|
-
- Keep the **
|
|
1710
|
+
- Keep the **task_checklist** checklist updated with the mandatory format (\u{1F5F9} done, \u2610 pending).
|
|
1711
1711
|
- Adjust total thoughts count as needed.
|
|
1712
1712
|
- Explore hypotheses, verify them via chain-of-thought, and recommend appropriate tools for each step.
|
|
1713
|
-
- Never put future steps or to-do items inside **thought**, only in **
|
|
1713
|
+
- Never put future steps or to-do items inside **thought**, only in **task_checklist**.
|
|
1714
1714
|
|
|
1715
|
-
4. PROCESS
|
|
1716
|
-
- Execute the pending tasks from the **
|
|
1715
|
+
4. PROCESS TASKS IN CHECKLIST
|
|
1716
|
+
- Execute the pending tasks from the **task_checklist** checklist one by one, updating the list and reasoning.
|
|
1717
1717
|
- Use recommended tools as per the reflective analysis.
|
|
1718
1718
|
- Do not finalize or deliver a final answer before completing all pending tasks.
|
|
1719
1719
|
|
|
1720
1720
|
5. CLOSE THE TASK AND THE TURN
|
|
1721
|
-
-
|
|
1721
|
+
- Only close the turn when **all** originally planned tasks and any subtasks discovered during execution are fully completed.
|
|
1722
|
+
- Never treat the completion of a single subtask as completion of the entire objective.
|
|
1723
|
+
- When all **task_checklist** are done (all marked with \u{1F5F9}), notify the user clearly:
|
|
1722
1724
|
"Task completed. There are no further pending actions."
|
|
1723
|
-
- You MUST call the \`<agent_end_task_rules>\` tool to close the turn.
|
|
1725
|
+
- You MUST call the \`<agent_end_task_rules>\` tool **only at this stage** to close the turn.
|
|
1726
|
+
- Closing the turn ends the current autonomous workflow; ensure no further actions are pending or reasonably expected.
|
|
1724
1727
|
- Do not perform any action after calling this tool in the same turn.
|
|
1725
1728
|
|
|
1726
1729
|
6. WAIT FOR NEW TASK
|
|
@@ -1732,8 +1735,8 @@ When asked to perform tasks such as fixing bugs, adding features, refactoring, o
|
|
|
1732
1735
|
### IMPORTANT RULES
|
|
1733
1736
|
- Sending the initial message is mandatory and marks the turn start.
|
|
1734
1737
|
- Using the reasoning notebook is mandatory.
|
|
1735
|
-
- Breaking the task into **
|
|
1736
|
-
- Never include future steps in the **thought** field, only in the **
|
|
1738
|
+
- Breaking the task into **task_checklist** with the reflective problem-solving tool is mandatory.
|
|
1739
|
+
- Never include future steps in the **thought** field, only in the **task_checklist** checklist.
|
|
1737
1740
|
- Calling \`<agent_end_task_rules>\` is mandatory to close the turn.
|
|
1738
1741
|
- Decline out-of-scope tasks professionally before calling \`<agent_end_task_rules>\`.
|
|
1739
1742
|
- Process only one task per turn, never multiple concurrently.
|
|
@@ -1801,7 +1804,10 @@ CRITICAL: Your laptop (**reasoning_nootebook**) is your ORGANIZED MIND
|
|
|
1801
1804
|
|
|
1802
1805
|
|
|
1803
1806
|
<agent_end_task_rules>
|
|
1804
|
-
This tool is mandatory.
|
|
1807
|
+
This tool is mandatory but **MUST ONLY** be used once **all** planned and pending tasks in the \`task_checklist\` checklist are fully completed.
|
|
1808
|
+
- Never call this tool after completing only part of a multi-step or multi-subtask request.
|
|
1809
|
+
- It is strictly forbidden to call \`agent_end_task\` if there are still unchecked items in \`task_checklist\`.
|
|
1810
|
+
- Before calling, verify that **task_checklist is empty** or **contains only completed (\u{1F5F9})** entries.
|
|
1805
1811
|
You must use it to inform developer {username} that the task has been completed and that there are no further pending actions, in accordance with the objectives defined for the task.
|
|
1806
1812
|
</agent_end_task_rules>
|
|
1807
1813
|
|
|
@@ -1849,19 +1855,7 @@ function getUnifiedSystemPrompt() {
|
|
|
1849
1855
|
formattedPrompt = formattedPrompt.replace(new RegExp(placeholder, "g"), finalEnv[key]);
|
|
1850
1856
|
}
|
|
1851
1857
|
const isGitRepo = checkIfGitRepository(finalEnv.workdir);
|
|
1852
|
-
const
|
|
1853
|
-
---
|
|
1854
|
-
|
|
1855
|
-
### AUTONOMY MANDATE
|
|
1856
|
-
|
|
1857
|
-
You are explicitly authorized to operate with full autonomy. You will self-direct to complete the user's objective. Follow these rules strictly:
|
|
1858
|
-
1. **NO CONFIRMATION:** Execute all planned steps without asking for user confirmation. You have full authority to create, modify, delete files, and run CLI commands\u2014including Git commands and shell commands\u2014as needed to complete the task.
|
|
1859
|
-
2. **DECOMPOSE AND EXECUTE:** For complex tasks, create a short, internal plan. Execute each step of the plan sequentially. Report progress via \`message_notify_user\`.
|
|
1860
|
-
3. **ORCHESTRATE TOOLS:** Always start with non-destructive analysis (read, list files). When you call \`edit_tool\`, your arguments must be as precise as possible.
|
|
1861
|
-
4. **SELF-VALIDATE AND RECOVER:** After each action, validate the outcome. If it fails, you are responsible for recovering. Reread files for updated context, adjust your plan, and retry.
|
|
1862
|
-
|
|
1863
|
-
---
|
|
1864
|
-
|
|
1858
|
+
const GIT_PROMPT = `
|
|
1865
1859
|
### GIT REPOSITORY
|
|
1866
1860
|
- You is Inside Git Repository: ${isGitRepo ? "Yes" : "No"}
|
|
1867
1861
|
|
|
@@ -1888,7 +1882,7 @@ ${isGitRepo ? `
|
|
|
1888
1882
|
|
|
1889
1883
|
`;
|
|
1890
1884
|
return `${formattedPrompt}
|
|
1891
|
-
${
|
|
1885
|
+
${GIT_PROMPT}`;
|
|
1892
1886
|
}
|
|
1893
1887
|
function checkIfGitRepository(dirPath) {
|
|
1894
1888
|
const gitPath = path8.join(dirPath, ".git");
|
|
@@ -2257,9 +2251,9 @@ CRITICAL: Your laptop (reasoning_nootebook) is your ORGANIZED MIND
|
|
|
2257
2251
|
- Jumping between unrelated subtasks
|
|
2258
2252
|
|
|
2259
2253
|
Important rule:
|
|
2260
|
-
Do not include future steps/to-dos in thought; put them strictly in
|
|
2254
|
+
Do not include future steps/to-dos in thought; put them strictly in task_checklist, using the mandated checklist markers.
|
|
2261
2255
|
|
|
2262
|
-
-
|
|
2256
|
+
- task_checklist: Checklist list of high-level upcoming tasks.
|
|
2263
2257
|
Format is mandatory:
|
|
2264
2258
|
- "\u{1F5F8}" \u2192 for tasks not yet done (pending)
|
|
2265
2259
|
- "[ ]" \u2192 for tasks already completed
|
|
@@ -2880,15 +2874,15 @@ var renderBlumaNotebook = ({
|
|
|
2880
2874
|
paddingX: 1,
|
|
2881
2875
|
children: [
|
|
2882
2876
|
/* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
2883
|
-
/* @__PURE__ */ jsx8(Text8, { bold: true, children: "
|
|
2877
|
+
/* @__PURE__ */ jsx8(Text8, { color: "white", bold: true, children: "Reasoning:" }),
|
|
2884
2878
|
/* @__PURE__ */ jsx8(Box8, { marginLeft: 2, children: /* @__PURE__ */ jsx8(Text8, { color: "gray", children: thinkingData.thought }) })
|
|
2885
2879
|
] }),
|
|
2886
|
-
thinkingData.
|
|
2887
|
-
/* @__PURE__ */ jsx8(Text8, {
|
|
2888
|
-
thinkingData.
|
|
2880
|
+
thinkingData.task_checklist && thinkingData.task_checklist.length > 0 && /* @__PURE__ */ jsxs8(Box8, { marginTop: 1, flexDirection: "column", children: [
|
|
2881
|
+
/* @__PURE__ */ jsx8(Text8, { color: "white", bold: true, children: "Todos:" }),
|
|
2882
|
+
thinkingData.task_checklist.map((task, index) => /* @__PURE__ */ jsx8(Box8, { marginLeft: 2, children: /* @__PURE__ */ jsx8(Text8, { children: /* @__PURE__ */ jsx8(
|
|
2889
2883
|
Text8,
|
|
2890
2884
|
{
|
|
2891
|
-
color: task.startsWith("\u{1F5F9}") ? "
|
|
2885
|
+
color: task.startsWith("\u{1F5F9}") ? "gray" : "white",
|
|
2892
2886
|
strikethrough: task.startsWith("\u{1F5F9}"),
|
|
2893
2887
|
children: task
|
|
2894
2888
|
}
|
|
@@ -2917,7 +2911,7 @@ var renderEditToolCall = ({
|
|
|
2917
2911
|
filepath = "Error parsing arguments";
|
|
2918
2912
|
}
|
|
2919
2913
|
const finalFileName = filepath;
|
|
2920
|
-
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 1, children: [
|
|
2914
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 1, borderStyle: "round", borderColor: "gray", borderDimColor: true, children: [
|
|
2921
2915
|
/* @__PURE__ */ jsx8(Box8, { children: /* @__PURE__ */ jsxs8(Text8, { bold: true, children: [
|
|
2922
2916
|
/* @__PURE__ */ jsx8(Text8, { color: "green", children: "\u25CF " }),
|
|
2923
2917
|
"Edit File"
|
|
@@ -2970,8 +2964,167 @@ var ToolCallDisplay = memo2(ToolCallDisplayComponent);
|
|
|
2970
2964
|
|
|
2971
2965
|
// src/app/ui/components/ToolResultDisplay.tsx
|
|
2972
2966
|
import { memo as memo3 } from "react";
|
|
2967
|
+
import { Box as Box11 } from "ink";
|
|
2968
|
+
|
|
2969
|
+
// src/app/ui/components/MarkdownRenderer.tsx
|
|
2973
2970
|
import { Box as Box10, Text as Text9 } from "ink";
|
|
2974
|
-
import {
|
|
2971
|
+
import { marked } from "marked";
|
|
2972
|
+
import { highlight } from "cli-highlight";
|
|
2973
|
+
import chalk from "chalk";
|
|
2974
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2975
|
+
function renderTokens(tokens) {
|
|
2976
|
+
const out = [];
|
|
2977
|
+
for (const token of tokens) {
|
|
2978
|
+
switch (token.type) {
|
|
2979
|
+
case "heading": {
|
|
2980
|
+
const t = token;
|
|
2981
|
+
const colors = {
|
|
2982
|
+
1: chalk.bold.hex("#0969da"),
|
|
2983
|
+
// Azul GitHub
|
|
2984
|
+
2: chalk.bold.hex("#1a7f37"),
|
|
2985
|
+
// Verde suave
|
|
2986
|
+
3: chalk.bold.hex("#8250df"),
|
|
2987
|
+
// Roxo
|
|
2988
|
+
4: chalk.bold.hex("#cf222e"),
|
|
2989
|
+
// Vermelho
|
|
2990
|
+
5: chalk.bold.hex("#9a6700"),
|
|
2991
|
+
// Amarelo escuro
|
|
2992
|
+
6: chalk.bold.hex("#57606a")
|
|
2993
|
+
// Cinza
|
|
2994
|
+
};
|
|
2995
|
+
out.push(
|
|
2996
|
+
/* @__PURE__ */ jsx10(Box10, { marginBottom: 1, children: /* @__PURE__ */ jsx10(Text9, { children: colors[t.depth](`# ${t.text}`) }) }, out.length)
|
|
2997
|
+
);
|
|
2998
|
+
break;
|
|
2999
|
+
}
|
|
3000
|
+
case "paragraph": {
|
|
3001
|
+
const p = token;
|
|
3002
|
+
out.push(
|
|
3003
|
+
/* @__PURE__ */ jsx10(Box10, { marginBottom: 1, flexDirection: "row", children: renderInline(p.text) }, out.length)
|
|
3004
|
+
);
|
|
3005
|
+
break;
|
|
3006
|
+
}
|
|
3007
|
+
case "list": {
|
|
3008
|
+
const l = token;
|
|
3009
|
+
l.items.forEach((item, idx) => {
|
|
3010
|
+
const text = item.tokens ? item.tokens.map((t) => t.type === "text" ? t.text : "").join("") : item.text;
|
|
3011
|
+
out.push(
|
|
3012
|
+
/* @__PURE__ */ jsxs9(Box10, { paddingLeft: 2, children: [
|
|
3013
|
+
/* @__PURE__ */ jsx10(Text9, { color: "white", children: l.ordered ? `${idx + 1}.` : "\u2022" }),
|
|
3014
|
+
/* @__PURE__ */ jsxs9(Text9, { children: [
|
|
3015
|
+
" ",
|
|
3016
|
+
renderInline(text)
|
|
3017
|
+
] })
|
|
3018
|
+
] }, out.length)
|
|
3019
|
+
);
|
|
3020
|
+
});
|
|
3021
|
+
out.push(/* @__PURE__ */ jsx10(Box10, { marginBottom: 1 }, out.length));
|
|
3022
|
+
break;
|
|
3023
|
+
}
|
|
3024
|
+
case "code": {
|
|
3025
|
+
const c = token;
|
|
3026
|
+
const highlighted = highlight(c.text, {
|
|
3027
|
+
language: c.lang ?? "text",
|
|
3028
|
+
ignoreIllegals: true
|
|
3029
|
+
});
|
|
3030
|
+
out.push(
|
|
3031
|
+
/* @__PURE__ */ jsxs9(
|
|
3032
|
+
Box10,
|
|
3033
|
+
{
|
|
3034
|
+
flexDirection: "column",
|
|
3035
|
+
borderStyle: "round",
|
|
3036
|
+
borderColor: "gray",
|
|
3037
|
+
children: [
|
|
3038
|
+
/* @__PURE__ */ jsx10(Box10, { marginBottom: 1, children: /* @__PURE__ */ jsx10(Text9, { bold: true, color: "cyan", children: c.lang ?? "code" }) }),
|
|
3039
|
+
/* @__PURE__ */ jsx10(Box10, { children: /* @__PURE__ */ jsx10(Text9, { children: highlighted }) })
|
|
3040
|
+
]
|
|
3041
|
+
},
|
|
3042
|
+
out.length
|
|
3043
|
+
)
|
|
3044
|
+
);
|
|
3045
|
+
break;
|
|
3046
|
+
}
|
|
3047
|
+
case "blockquote": {
|
|
3048
|
+
const b = token;
|
|
3049
|
+
out.push(
|
|
3050
|
+
/* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", children: [
|
|
3051
|
+
/* @__PURE__ */ jsx10(Text9, { color: "#0969da", children: "\u2502 " }),
|
|
3052
|
+
/* @__PURE__ */ jsx10(Text9, { dimColor: true, italic: true, children: b.text })
|
|
3053
|
+
] }, out.length)
|
|
3054
|
+
);
|
|
3055
|
+
break;
|
|
3056
|
+
}
|
|
3057
|
+
case "table": {
|
|
3058
|
+
const table = token;
|
|
3059
|
+
const headerCells = table.header.map(
|
|
3060
|
+
(cell) => chalk.bold(cell.text)
|
|
3061
|
+
);
|
|
3062
|
+
out.push(
|
|
3063
|
+
/* @__PURE__ */ jsx10(Box10, { flexDirection: "row", children: headerCells.map((h, i) => /* @__PURE__ */ jsx10(Box10, { paddingRight: 2, children: /* @__PURE__ */ jsx10(Text9, { children: h }) }, i)) }, out.length)
|
|
3064
|
+
);
|
|
3065
|
+
table.rows.forEach((row) => {
|
|
3066
|
+
out.push(
|
|
3067
|
+
/* @__PURE__ */ jsx10(Box10, { flexDirection: "row", children: row.map((cell, i) => /* @__PURE__ */ jsx10(Box10, { paddingRight: 2, children: /* @__PURE__ */ jsx10(Text9, { children: cell.text }) }, i)) }, out.length)
|
|
3068
|
+
);
|
|
3069
|
+
});
|
|
3070
|
+
out.push(/* @__PURE__ */ jsx10(Box10, { marginBottom: 1 }, out.length));
|
|
3071
|
+
break;
|
|
3072
|
+
}
|
|
3073
|
+
default:
|
|
3074
|
+
if (token.text) {
|
|
3075
|
+
out.push(/* @__PURE__ */ jsx10(Text9, { children: token.text }, out.length));
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
return out;
|
|
3080
|
+
}
|
|
3081
|
+
function renderInline(text) {
|
|
3082
|
+
const parts = [];
|
|
3083
|
+
let rest = text;
|
|
3084
|
+
const regex = /(\*\*(.+?)\*\*|\*(.+?)\*|`(.+?)`|\[(.+?)\]\((.+?)\))/;
|
|
3085
|
+
while (rest.length) {
|
|
3086
|
+
const m = rest.match(regex);
|
|
3087
|
+
if (!m) {
|
|
3088
|
+
parts.push(/* @__PURE__ */ jsx10(Text9, { children: rest }, parts.length));
|
|
3089
|
+
break;
|
|
3090
|
+
}
|
|
3091
|
+
const index = m.index ?? 0;
|
|
3092
|
+
if (index > 0)
|
|
3093
|
+
parts.push(/* @__PURE__ */ jsx10(Text9, { children: rest.slice(0, index) }, parts.length));
|
|
3094
|
+
const token = m[0];
|
|
3095
|
+
if (token.startsWith("**")) {
|
|
3096
|
+
parts.push(
|
|
3097
|
+
/* @__PURE__ */ jsx10(Text9, { bold: true, children: m[2] }, parts.length)
|
|
3098
|
+
);
|
|
3099
|
+
} else if (token.startsWith("*")) {
|
|
3100
|
+
parts.push(
|
|
3101
|
+
/* @__PURE__ */ jsx10(Text9, { italic: true, children: m[3] }, parts.length)
|
|
3102
|
+
);
|
|
3103
|
+
} else if (token.startsWith("`")) {
|
|
3104
|
+
parts.push(
|
|
3105
|
+
/* @__PURE__ */ jsx10(Text9, { children: /* @__PURE__ */ jsx10(Text9, { backgroundColor: "#eaeef2", color: "black", children: ` ${m[4]} ` }) }, parts.length)
|
|
3106
|
+
);
|
|
3107
|
+
} else if (token.startsWith("[")) {
|
|
3108
|
+
parts.push(
|
|
3109
|
+
/* @__PURE__ */ jsxs9(Text9, { underline: true, color: "#0969da", children: [
|
|
3110
|
+
m[5],
|
|
3111
|
+
" (",
|
|
3112
|
+
m[6],
|
|
3113
|
+
")"
|
|
3114
|
+
] }, parts.length)
|
|
3115
|
+
);
|
|
3116
|
+
}
|
|
3117
|
+
rest = rest.slice(index + token.length);
|
|
3118
|
+
}
|
|
3119
|
+
return parts;
|
|
3120
|
+
}
|
|
3121
|
+
var MarkdownRenderer = ({ markdown }) => {
|
|
3122
|
+
const tokens = marked.lexer(markdown);
|
|
3123
|
+
return /* @__PURE__ */ jsx10(Box10, { flexDirection: "column", children: renderTokens(tokens) });
|
|
3124
|
+
};
|
|
3125
|
+
|
|
3126
|
+
// src/app/ui/components/ToolResultDisplay.tsx
|
|
3127
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2975
3128
|
var ToolResultDisplayComponent = ({ toolName, result }) => {
|
|
2976
3129
|
if (!toolName.includes("message_notify_user")) {
|
|
2977
3130
|
return null;
|
|
@@ -2980,7 +3133,7 @@ var ToolResultDisplayComponent = ({ toolName, result }) => {
|
|
|
2980
3133
|
const parsed = JSON.parse(result);
|
|
2981
3134
|
if (parsed.content && parsed.content.body) {
|
|
2982
3135
|
const bodyText = parsed.content.body.trim();
|
|
2983
|
-
return /* @__PURE__ */
|
|
3136
|
+
return /* @__PURE__ */ jsx11(Box11, { marginBottom: 1, paddingX: 1, flexDirection: "column", children: /* @__PURE__ */ jsx11(MarkdownRenderer, { markdown: bodyText }) });
|
|
2984
3137
|
}
|
|
2985
3138
|
} catch (e) {
|
|
2986
3139
|
return null;
|
|
@@ -2990,50 +3143,50 @@ var ToolResultDisplayComponent = ({ toolName, result }) => {
|
|
|
2990
3143
|
var ToolResultDisplay = memo3(ToolResultDisplayComponent);
|
|
2991
3144
|
|
|
2992
3145
|
// src/app/ui/SessionInfoConnectingMCP.tsx
|
|
2993
|
-
import { Box as
|
|
3146
|
+
import { Box as Box12, Text as Text11 } from "ink";
|
|
2994
3147
|
import Spinner from "ink-spinner";
|
|
2995
|
-
import { jsx as
|
|
3148
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2996
3149
|
var SessionInfoConnectingMCP = ({
|
|
2997
3150
|
sessionId: sessionId2,
|
|
2998
3151
|
workdir,
|
|
2999
3152
|
statusMessage
|
|
3000
3153
|
}) => {
|
|
3001
|
-
return /* @__PURE__ */
|
|
3002
|
-
|
|
3154
|
+
return /* @__PURE__ */ jsx12(
|
|
3155
|
+
Box12,
|
|
3003
3156
|
{
|
|
3004
3157
|
borderStyle: "round",
|
|
3005
3158
|
borderColor: "gray",
|
|
3006
3159
|
marginBottom: 1,
|
|
3007
|
-
children: /* @__PURE__ */
|
|
3008
|
-
|
|
3160
|
+
children: /* @__PURE__ */ jsxs10(
|
|
3161
|
+
Box12,
|
|
3009
3162
|
{
|
|
3010
3163
|
marginLeft: 1,
|
|
3011
3164
|
flexDirection: "column",
|
|
3012
3165
|
children: [
|
|
3013
|
-
/* @__PURE__ */
|
|
3014
|
-
/* @__PURE__ */
|
|
3166
|
+
/* @__PURE__ */ jsxs10(Text11, { children: [
|
|
3167
|
+
/* @__PURE__ */ jsx12(Text11, { bold: true, color: "white", children: "localhost" }),
|
|
3015
3168
|
" ",
|
|
3016
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ jsx12(Text11, { color: "gray", children: " session:" }),
|
|
3017
3170
|
" ",
|
|
3018
|
-
/* @__PURE__ */
|
|
3171
|
+
/* @__PURE__ */ jsx12(Text11, { color: "magenta", children: sessionId2 })
|
|
3019
3172
|
] }),
|
|
3020
|
-
/* @__PURE__ */
|
|
3021
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ jsxs10(Text11, { children: [
|
|
3174
|
+
/* @__PURE__ */ jsx12(Text11, { color: "magenta", children: "\u21B3" }),
|
|
3022
3175
|
" ",
|
|
3023
|
-
/* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ jsxs10(Text11, { color: "gray", children: [
|
|
3024
3177
|
"workdir: ",
|
|
3025
3178
|
workdir
|
|
3026
3179
|
] })
|
|
3027
3180
|
] }),
|
|
3028
|
-
/* @__PURE__ */
|
|
3029
|
-
/* @__PURE__ */
|
|
3181
|
+
/* @__PURE__ */ jsxs10(Text11, { children: [
|
|
3182
|
+
/* @__PURE__ */ jsx12(Text11, { color: "magenta", children: "\u21B3" }),
|
|
3030
3183
|
" ",
|
|
3031
|
-
/* @__PURE__ */
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3184
|
+
/* @__PURE__ */ jsx12(Text11, { color: "gray", children: "mcp: " }),
|
|
3185
|
+
/* @__PURE__ */ jsxs10(Text11, { color: "yellow", children: [
|
|
3186
|
+
/* @__PURE__ */ jsx12(Spinner, { type: "dots" }),
|
|
3034
3187
|
" "
|
|
3035
3188
|
] }),
|
|
3036
|
-
/* @__PURE__ */
|
|
3189
|
+
/* @__PURE__ */ jsx12(Text11, { color: "white", children: statusMessage || "Please wait while we establish connections." })
|
|
3037
3190
|
] })
|
|
3038
3191
|
]
|
|
3039
3192
|
}
|
|
@@ -3044,11 +3197,11 @@ var SessionInfoConnectingMCP = ({
|
|
|
3044
3197
|
var SessionInfoConnectingMCP_default = SessionInfoConnectingMCP;
|
|
3045
3198
|
|
|
3046
3199
|
// src/app/ui/components/SlashCommands.tsx
|
|
3047
|
-
import { Box as
|
|
3048
|
-
import { Fragment as Fragment2, jsx as
|
|
3200
|
+
import { Box as Box13, Text as Text12 } from "ink";
|
|
3201
|
+
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3049
3202
|
var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
3050
3203
|
const [cmd, ...args] = input.slice(1).trim().split(/\s+/);
|
|
3051
|
-
const outBox = (children) => /* @__PURE__ */
|
|
3204
|
+
const outBox = (children) => /* @__PURE__ */ jsx13(Box13, { borderStyle: "round", borderColor: "gray", paddingX: 1, marginBottom: 1, flexDirection: "column", children });
|
|
3052
3205
|
const render2 = () => {
|
|
3053
3206
|
if (!cmd) {
|
|
3054
3207
|
return null;
|
|
@@ -3056,9 +3209,9 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3056
3209
|
if (cmd === "help") {
|
|
3057
3210
|
const cmds = getSlashCommands();
|
|
3058
3211
|
return outBox(
|
|
3059
|
-
/* @__PURE__ */
|
|
3060
|
-
/* @__PURE__ */
|
|
3061
|
-
cmds.map((c, i) => /* @__PURE__ */
|
|
3212
|
+
/* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
3213
|
+
/* @__PURE__ */ jsx13(Text12, { color: "magenta", bold: true, children: "Available commands" }),
|
|
3214
|
+
cmds.map((c, i) => /* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3062
3215
|
c.name,
|
|
3063
3216
|
" - ",
|
|
3064
3217
|
c.description
|
|
@@ -3068,7 +3221,7 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3068
3221
|
}
|
|
3069
3222
|
if (cmd === "clear") {
|
|
3070
3223
|
setHistory((prev) => prev.filter((item) => item.id === 0 || item.id === 1));
|
|
3071
|
-
return outBox(/* @__PURE__ */
|
|
3224
|
+
return outBox(/* @__PURE__ */ jsx13(Text12, { color: "green", children: "History cleared." }));
|
|
3072
3225
|
}
|
|
3073
3226
|
if (cmd === "init") {
|
|
3074
3227
|
(async () => {
|
|
@@ -3077,7 +3230,7 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3077
3230
|
} catch (e) {
|
|
3078
3231
|
setHistory((prev) => prev.concat({
|
|
3079
3232
|
id: Date.now(),
|
|
3080
|
-
component: outBox(/* @__PURE__ */
|
|
3233
|
+
component: outBox(/* @__PURE__ */ jsxs11(Text12, { color: "red", children: [
|
|
3081
3234
|
"Failed to execute /init: ",
|
|
3082
3235
|
e?.message || String(e)
|
|
3083
3236
|
] }))
|
|
@@ -3097,22 +3250,22 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3097
3250
|
const colType = 10;
|
|
3098
3251
|
const colSource = 18;
|
|
3099
3252
|
return outBox(
|
|
3100
|
-
/* @__PURE__ */
|
|
3101
|
-
/* @__PURE__ */
|
|
3102
|
-
/* @__PURE__ */
|
|
3253
|
+
/* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
3254
|
+
/* @__PURE__ */ jsx13(Text12, { color: "magenta", bold: true, children: "MCP Tools" }),
|
|
3255
|
+
/* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3103
3256
|
"Total MCP: ",
|
|
3104
3257
|
tools.length,
|
|
3105
3258
|
term ? ` | Filter: "${term}" | Showing: ${filtered.length}` : ""
|
|
3106
3259
|
] }),
|
|
3107
|
-
filtered.length === 0 ? /* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3260
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx13(Text12, { color: "yellow", children: "No MCP tools to display." }) : /* @__PURE__ */ jsxs11(Box13, { flexDirection: "column", children: [
|
|
3261
|
+
/* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3109
3262
|
pad("Name", colName),
|
|
3110
3263
|
" | ",
|
|
3111
3264
|
pad("Type", colType),
|
|
3112
3265
|
" | ",
|
|
3113
3266
|
pad("Source", colSource)
|
|
3114
3267
|
] }),
|
|
3115
|
-
/* @__PURE__ */
|
|
3268
|
+
/* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3116
3269
|
"".padEnd(colName, "-"),
|
|
3117
3270
|
"---",
|
|
3118
3271
|
"".padEnd(colType, "-"),
|
|
@@ -3123,7 +3276,7 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3123
3276
|
const name = t.function?.name || t.name || "tool";
|
|
3124
3277
|
const type = t.function?.name ? "fn" : t.type || "tool";
|
|
3125
3278
|
const source = t.source || t.provider || "mcp";
|
|
3126
|
-
return /* @__PURE__ */
|
|
3279
|
+
return /* @__PURE__ */ jsxs11(Text12, { color: "white", children: [
|
|
3127
3280
|
pad(name, colName),
|
|
3128
3281
|
" | ",
|
|
3129
3282
|
pad(String(type), colType),
|
|
@@ -3146,22 +3299,22 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3146
3299
|
const colType = 10;
|
|
3147
3300
|
const colSource = 18;
|
|
3148
3301
|
return outBox(
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
/* @__PURE__ */
|
|
3151
|
-
/* @__PURE__ */
|
|
3302
|
+
/* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
3303
|
+
/* @__PURE__ */ jsx13(Text12, { color: "magenta", bold: true, children: "Native Tools" }),
|
|
3304
|
+
/* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3152
3305
|
"Total Native: ",
|
|
3153
3306
|
tools.length,
|
|
3154
3307
|
term ? ` | Filter: "${term}" | Showing: ${filtered.length}` : ""
|
|
3155
3308
|
] }),
|
|
3156
|
-
filtered.length === 0 ? /* @__PURE__ */
|
|
3157
|
-
/* @__PURE__ */
|
|
3309
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx13(Text12, { color: "yellow", children: "No native tools to display." }) : /* @__PURE__ */ jsxs11(Box13, { flexDirection: "column", children: [
|
|
3310
|
+
/* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3158
3311
|
pad("Name", colName),
|
|
3159
3312
|
" | ",
|
|
3160
3313
|
pad("Type", colType),
|
|
3161
3314
|
" | ",
|
|
3162
3315
|
pad("Source", colSource)
|
|
3163
3316
|
] }),
|
|
3164
|
-
/* @__PURE__ */
|
|
3317
|
+
/* @__PURE__ */ jsxs11(Text12, { color: "gray", children: [
|
|
3165
3318
|
"".padEnd(colName, "-"),
|
|
3166
3319
|
"---",
|
|
3167
3320
|
"".padEnd(colType, "-"),
|
|
@@ -3172,7 +3325,7 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3172
3325
|
const name = t.function?.name || t.name || "tool";
|
|
3173
3326
|
const type = t.function?.name ? "fn" : t.type || "tool";
|
|
3174
3327
|
const source = t.source || "native";
|
|
3175
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ jsxs11(Text12, { color: "white", children: [
|
|
3176
3329
|
pad(name, colName),
|
|
3177
3330
|
" | ",
|
|
3178
3331
|
pad(String(type), colType),
|
|
@@ -3184,12 +3337,12 @@ var SlashCommands = ({ input, setHistory, agentRef }) => {
|
|
|
3184
3337
|
] })
|
|
3185
3338
|
);
|
|
3186
3339
|
}
|
|
3187
|
-
return outBox(/* @__PURE__ */
|
|
3340
|
+
return outBox(/* @__PURE__ */ jsxs11(Text12, { color: "red", children: [
|
|
3188
3341
|
"Command not recognized: /",
|
|
3189
3342
|
cmd
|
|
3190
3343
|
] }));
|
|
3191
3344
|
};
|
|
3192
|
-
return /* @__PURE__ */
|
|
3345
|
+
return /* @__PURE__ */ jsx13(Fragment2, { children: render2() });
|
|
3193
3346
|
};
|
|
3194
3347
|
var SlashCommands_default = SlashCommands;
|
|
3195
3348
|
|
|
@@ -3260,8 +3413,8 @@ async function checkForUpdates() {
|
|
|
3260
3413
|
}
|
|
3261
3414
|
|
|
3262
3415
|
// src/app/ui/components/UpdateNotice.tsx
|
|
3263
|
-
import { Box as
|
|
3264
|
-
import { jsx as
|
|
3416
|
+
import { Box as Box14, Text as Text13 } from "ink";
|
|
3417
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3265
3418
|
function parseUpdateMessage(msg) {
|
|
3266
3419
|
const lines = msg.split(/\r?\n/).map((l) => l.trim());
|
|
3267
3420
|
const first = lines[0] || "";
|
|
@@ -3280,20 +3433,20 @@ function parseUpdateMessage(msg) {
|
|
|
3280
3433
|
}
|
|
3281
3434
|
var UpdateNotice = ({ message }) => {
|
|
3282
3435
|
const { name, current, latest, hint } = parseUpdateMessage(message);
|
|
3283
|
-
return /* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
name && current && latest ? /* @__PURE__ */
|
|
3286
|
-
hint ? /* @__PURE__ */
|
|
3436
|
+
return /* @__PURE__ */ jsxs12(Box14, { flexDirection: "column", marginBottom: 1, children: [
|
|
3437
|
+
/* @__PURE__ */ jsx14(Text13, { color: "yellow", bold: true, children: "Update Available" }),
|
|
3438
|
+
name && current && latest ? /* @__PURE__ */ jsx14(Text13, { color: "gray", children: `${name}: ${current} \u2192 ${latest}` }) : /* @__PURE__ */ jsx14(Text13, { color: "gray", children: message }),
|
|
3439
|
+
hint ? /* @__PURE__ */ jsx14(Text13, { color: "gray", children: hint }) : null
|
|
3287
3440
|
] });
|
|
3288
3441
|
};
|
|
3289
3442
|
var UpdateNotice_default = UpdateNotice;
|
|
3290
3443
|
|
|
3291
3444
|
// src/app/ui/components/ErrorMessage.tsx
|
|
3292
|
-
import { Box as
|
|
3293
|
-
import { jsx as
|
|
3445
|
+
import { Box as Box15, Text as Text14 } from "ink";
|
|
3446
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3294
3447
|
var ErrorMessage = ({ message, details, hint }) => {
|
|
3295
|
-
return /* @__PURE__ */
|
|
3296
|
-
|
|
3448
|
+
return /* @__PURE__ */ jsxs13(
|
|
3449
|
+
Box15,
|
|
3297
3450
|
{
|
|
3298
3451
|
borderStyle: "round",
|
|
3299
3452
|
borderColor: "red",
|
|
@@ -3302,10 +3455,10 @@ var ErrorMessage = ({ message, details, hint }) => {
|
|
|
3302
3455
|
flexDirection: "column",
|
|
3303
3456
|
marginBottom: 1,
|
|
3304
3457
|
children: [
|
|
3305
|
-
/* @__PURE__ */
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
details ? /* @__PURE__ */
|
|
3308
|
-
hint ? /* @__PURE__ */
|
|
3458
|
+
/* @__PURE__ */ jsx15(Text14, { color: "red", bold: true, children: "Error" }),
|
|
3459
|
+
/* @__PURE__ */ jsx15(Text14, { color: "red", children: message }),
|
|
3460
|
+
details ? /* @__PURE__ */ jsx15(Text14, { color: "red", dimColor: true, children: details }) : null,
|
|
3461
|
+
hint ? /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
|
|
3309
3462
|
"Hint: ",
|
|
3310
3463
|
hint
|
|
3311
3464
|
] }) : null
|
|
@@ -3316,7 +3469,7 @@ var ErrorMessage = ({ message, details, hint }) => {
|
|
|
3316
3469
|
var ErrorMessage_default = ErrorMessage;
|
|
3317
3470
|
|
|
3318
3471
|
// src/app/ui/App.tsx
|
|
3319
|
-
import { jsx as
|
|
3472
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3320
3473
|
var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
3321
3474
|
const agentInstance = useRef2(null);
|
|
3322
3475
|
const [history, setHistory] = useState5([]);
|
|
@@ -3346,7 +3499,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3346
3499
|
...prev,
|
|
3347
3500
|
{
|
|
3348
3501
|
id: prev.length,
|
|
3349
|
-
component: /* @__PURE__ */
|
|
3502
|
+
component: /* @__PURE__ */ jsx16(Text15, { color: "yellow", children: "-- Task cancelled by dev. --" })
|
|
3350
3503
|
}
|
|
3351
3504
|
]);
|
|
3352
3505
|
}, [isProcessing, eventBus2]);
|
|
@@ -3370,11 +3523,11 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3370
3523
|
...prev,
|
|
3371
3524
|
{
|
|
3372
3525
|
id: prev.length,
|
|
3373
|
-
component: /* @__PURE__ */
|
|
3526
|
+
component: /* @__PURE__ */ jsx16(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text15, { color: "white", dimColor: true, children: text }) })
|
|
3374
3527
|
},
|
|
3375
3528
|
{
|
|
3376
3529
|
id: prev.length + 1,
|
|
3377
|
-
component: /* @__PURE__ */
|
|
3530
|
+
component: /* @__PURE__ */ jsx16(
|
|
3378
3531
|
SlashCommands_default,
|
|
3379
3532
|
{
|
|
3380
3533
|
input: text,
|
|
@@ -3394,8 +3547,8 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3394
3547
|
id: prev.length,
|
|
3395
3548
|
component: (
|
|
3396
3549
|
// Uma única Box para o espaçamento
|
|
3397
|
-
/* @__PURE__ */
|
|
3398
|
-
/* @__PURE__ */
|
|
3550
|
+
/* @__PURE__ */ jsx16(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsxs14(Text15, { color: "white", dimColor: true, children: [
|
|
3551
|
+
/* @__PURE__ */ jsxs14(Text15, { color: "white", children: [
|
|
3399
3552
|
"\u276F",
|
|
3400
3553
|
" "
|
|
3401
3554
|
] }),
|
|
@@ -3430,7 +3583,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3430
3583
|
[]
|
|
3431
3584
|
);
|
|
3432
3585
|
useEffect4(() => {
|
|
3433
|
-
setHistory([{ id: 0, component: /* @__PURE__ */
|
|
3586
|
+
setHistory([{ id: 0, component: /* @__PURE__ */ jsx16(Header, {}) }]);
|
|
3434
3587
|
const initializeAgent = async () => {
|
|
3435
3588
|
try {
|
|
3436
3589
|
agentInstance.current = new Agent(sessionId2, eventBus2);
|
|
@@ -3485,7 +3638,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3485
3638
|
if (prev.length < 2) {
|
|
3486
3639
|
newHistory.push({
|
|
3487
3640
|
id: 1,
|
|
3488
|
-
component: /* @__PURE__ */
|
|
3641
|
+
component: /* @__PURE__ */ jsx16(
|
|
3489
3642
|
SessionInfo,
|
|
3490
3643
|
{
|
|
3491
3644
|
sessionId: sessionId2,
|
|
@@ -3506,7 +3659,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3506
3659
|
...prev,
|
|
3507
3660
|
{
|
|
3508
3661
|
id: prev.length,
|
|
3509
|
-
component: /* @__PURE__ */
|
|
3662
|
+
component: /* @__PURE__ */ jsx16(UpdateNotice_default, { message: msg })
|
|
3510
3663
|
}
|
|
3511
3664
|
]);
|
|
3512
3665
|
}
|
|
@@ -3520,10 +3673,10 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3520
3673
|
}
|
|
3521
3674
|
let newComponent = null;
|
|
3522
3675
|
if (parsed.type === "debug") {
|
|
3523
|
-
newComponent = /* @__PURE__ */
|
|
3676
|
+
newComponent = /* @__PURE__ */ jsx16(Text15, { color: "gray", children: parsed.message });
|
|
3524
3677
|
} else if (parsed.type === "protocol_violation") {
|
|
3525
|
-
newComponent = /* @__PURE__ */
|
|
3526
|
-
|
|
3678
|
+
newComponent = /* @__PURE__ */ jsxs14(
|
|
3679
|
+
Box16,
|
|
3527
3680
|
{
|
|
3528
3681
|
borderStyle: "round",
|
|
3529
3682
|
borderColor: "yellow",
|
|
@@ -3531,14 +3684,14 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3531
3684
|
marginBottom: 1,
|
|
3532
3685
|
paddingX: 1,
|
|
3533
3686
|
children: [
|
|
3534
|
-
/* @__PURE__ */
|
|
3535
|
-
/* @__PURE__ */
|
|
3536
|
-
/* @__PURE__ */
|
|
3687
|
+
/* @__PURE__ */ jsx16(Text15, { color: "yellow", bold: true, children: "Protocol Violation" }),
|
|
3688
|
+
/* @__PURE__ */ jsx16(Text15, { color: "gray", children: parsed.content }),
|
|
3689
|
+
/* @__PURE__ */ jsx16(Text15, { color: "yellow", children: parsed.message })
|
|
3537
3690
|
]
|
|
3538
3691
|
}
|
|
3539
3692
|
);
|
|
3540
3693
|
} else if (parsed.type === "error") {
|
|
3541
|
-
newComponent = /* @__PURE__ */
|
|
3694
|
+
newComponent = /* @__PURE__ */ jsx16(
|
|
3542
3695
|
ErrorMessage_default,
|
|
3543
3696
|
{
|
|
3544
3697
|
message: parsed.message,
|
|
@@ -3547,7 +3700,8 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3547
3700
|
}
|
|
3548
3701
|
);
|
|
3549
3702
|
} else if (parsed.type === "tool_call") {
|
|
3550
|
-
|
|
3703
|
+
const nextId = history.length;
|
|
3704
|
+
newComponent = /* @__PURE__ */ jsx16(
|
|
3551
3705
|
ToolCallDisplay,
|
|
3552
3706
|
{
|
|
3553
3707
|
toolName: parsed.tool_name,
|
|
@@ -3556,7 +3710,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3556
3710
|
}
|
|
3557
3711
|
);
|
|
3558
3712
|
} else if (parsed.type === "tool_result") {
|
|
3559
|
-
newComponent = /* @__PURE__ */
|
|
3713
|
+
newComponent = /* @__PURE__ */ jsx16(
|
|
3560
3714
|
ToolResultDisplay,
|
|
3561
3715
|
{
|
|
3562
3716
|
toolName: parsed.tool_name,
|
|
@@ -3564,15 +3718,15 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3564
3718
|
}
|
|
3565
3719
|
);
|
|
3566
3720
|
} else if (parsed.type === "user_overlay") {
|
|
3567
|
-
newComponent = /* @__PURE__ */
|
|
3568
|
-
/* @__PURE__ */
|
|
3721
|
+
newComponent = /* @__PURE__ */ jsx16(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
|
|
3722
|
+
/* @__PURE__ */ jsxs14(Text15, { color: "magenta", children: [
|
|
3569
3723
|
"\u276F",
|
|
3570
3724
|
" "
|
|
3571
3725
|
] }),
|
|
3572
3726
|
parsed.payload
|
|
3573
3727
|
] }) });
|
|
3574
3728
|
} else if (parsed.type === "log") {
|
|
3575
|
-
newComponent = /* @__PURE__ */
|
|
3729
|
+
newComponent = /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
|
|
3576
3730
|
"\u2139\uFE0F ",
|
|
3577
3731
|
parsed.message,
|
|
3578
3732
|
parsed.payload ? `: ${parsed.payload}` : ""
|
|
@@ -3602,7 +3756,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3602
3756
|
}, [eventBus2, sessionId2, handleConfirmation]);
|
|
3603
3757
|
const renderInteractiveComponent = () => {
|
|
3604
3758
|
if (mcpStatus !== "connected") {
|
|
3605
|
-
return /* @__PURE__ */
|
|
3759
|
+
return /* @__PURE__ */ jsx16(Box16, { borderStyle: "round", borderColor: "black", children: /* @__PURE__ */ jsx16(
|
|
3606
3760
|
SessionInfoConnectingMCP_default,
|
|
3607
3761
|
{
|
|
3608
3762
|
sessionId: sessionId2,
|
|
@@ -3612,7 +3766,7 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3612
3766
|
) });
|
|
3613
3767
|
}
|
|
3614
3768
|
if (pendingConfirmation) {
|
|
3615
|
-
return /* @__PURE__ */
|
|
3769
|
+
return /* @__PURE__ */ jsx16(
|
|
3616
3770
|
ConfirmationPrompt,
|
|
3617
3771
|
{
|
|
3618
3772
|
toolCalls: pendingConfirmation,
|
|
@@ -3624,9 +3778,9 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3624
3778
|
}
|
|
3625
3779
|
);
|
|
3626
3780
|
}
|
|
3627
|
-
return /* @__PURE__ */
|
|
3628
|
-
isProcessing && !pendingConfirmation && /* @__PURE__ */
|
|
3629
|
-
/* @__PURE__ */
|
|
3781
|
+
return /* @__PURE__ */ jsxs14(Box16, { flexDirection: "column", children: [
|
|
3782
|
+
isProcessing && !pendingConfirmation && /* @__PURE__ */ jsx16(WorkingTimer, {}),
|
|
3783
|
+
/* @__PURE__ */ jsx16(
|
|
3630
3784
|
InputPrompt,
|
|
3631
3785
|
{
|
|
3632
3786
|
onSubmit: handleSubmit,
|
|
@@ -3637,8 +3791,8 @@ var AppComponent = ({ eventBus: eventBus2, sessionId: sessionId2 }) => {
|
|
|
3637
3791
|
)
|
|
3638
3792
|
] });
|
|
3639
3793
|
};
|
|
3640
|
-
return /* @__PURE__ */
|
|
3641
|
-
/* @__PURE__ */
|
|
3794
|
+
return /* @__PURE__ */ jsxs14(Box16, { flexDirection: "column", children: [
|
|
3795
|
+
/* @__PURE__ */ jsx16(Static, { items: history, children: (item) => /* @__PURE__ */ jsx16(Box16, { children: item.component }, item.id) }),
|
|
3642
3796
|
renderInteractiveComponent()
|
|
3643
3797
|
] });
|
|
3644
3798
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomad-e/bluma-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"description": "BluMa independent agent for automation and advanced software engineering.",
|
|
5
5
|
"author": "Alex Fonseca",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,12 +39,15 @@
|
|
|
39
39
|
"keywords": [],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
42
|
+
"chalk": "^5.5.0",
|
|
43
|
+
"cli-highlight": "^2.1.11",
|
|
42
44
|
"diff": "^8.0.2",
|
|
43
45
|
"dotenv": "^16.4.5",
|
|
44
|
-
"ink": "^5.
|
|
46
|
+
"ink": "^5.2.1",
|
|
45
47
|
"ink-big-text": "^2.0.0",
|
|
46
48
|
"ink-spinner": "^5.0.0",
|
|
47
49
|
"ink-text-input": "^6.0.0",
|
|
50
|
+
"marked": "^16.1.2",
|
|
48
51
|
"openai": "^4.47.3",
|
|
49
52
|
"react-devtools-core": "^4.28.5",
|
|
50
53
|
"read-package-up": "^11.0.0",
|