bravecode-cli 0.1.8 → 0.1.9
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/cli.cjs +20 -21
- package/dist/cli.cjs.map +2 -2
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -40744,29 +40744,29 @@ async function startSimpleTUI(model, agentId) {
|
|
|
40744
40744
|
const maxBannerWidth = Math.max(...bannerLines.map((l) => l.length));
|
|
40745
40745
|
const bannerPadding = Math.max(0, Math.floor((termWidth - maxBannerWidth) / 2));
|
|
40746
40746
|
for (const line of bannerLines) {
|
|
40747
|
-
process.stdout.write(" ".repeat(bannerPadding) + "\x1B[1m\x1B[
|
|
40747
|
+
process.stdout.write(" ".repeat(bannerPadding) + "\x1B[1m\x1B[37m" + line + "\x1B[0m\n");
|
|
40748
40748
|
}
|
|
40749
40749
|
process.stdout.write("\n\n");
|
|
40750
40750
|
const boxWidth = Math.min(60, termWidth - 4);
|
|
40751
40751
|
const boxPadding = Math.max(0, Math.floor((termWidth - boxWidth) / 2));
|
|
40752
|
-
process.stdout.write(" ".repeat(boxPadding) + "\x1B[
|
|
40752
|
+
process.stdout.write(" ".repeat(boxPadding) + "\x1B[90m\u250C" + "\u2500".repeat(boxWidth - 2) + "\u2510\x1B[0m\n");
|
|
40753
40753
|
process.stdout.write(
|
|
40754
|
-
" ".repeat(boxPadding) + '\x1B[
|
|
40754
|
+
" ".repeat(boxPadding) + '\x1B[90m\u2502\x1B[0m \x1B[90mAsk anything... "What is the tech stack of this project?"\x1B[0m' + " ".repeat(Math.max(0, boxWidth - 50)) + "\x1B[90m\u2502\x1B[0m\n"
|
|
40755
40755
|
);
|
|
40756
|
-
process.stdout.write(" ".repeat(boxPadding) + "\x1B[
|
|
40756
|
+
process.stdout.write(" ".repeat(boxPadding) + "\x1B[90m\u2514" + "\u2500".repeat(boxWidth - 2) + "\u2518\x1B[0m\n");
|
|
40757
40757
|
process.stdout.write("\n");
|
|
40758
|
-
const modelInfo = `\x1B[36m${agentName}\x1B[0m \x1B[
|
|
40758
|
+
const modelInfo = `\x1B[36m${agentName}\x1B[0m \x1B[90m\xB7\x1B[0m \x1B[37m${modelName}\x1B[0m \x1B[90mBraveCode AI\x1B[0m`;
|
|
40759
40759
|
const modelInfoWidth = agentName.length + modelName.length + 14;
|
|
40760
40760
|
const modelInfoPadding = Math.max(0, Math.floor((termWidth - modelInfoWidth) / 2));
|
|
40761
40761
|
process.stdout.write(" ".repeat(modelInfoPadding) + modelInfo + "\n");
|
|
40762
40762
|
process.stdout.write("\n");
|
|
40763
|
-
const hints = "\x1B[
|
|
40763
|
+
const hints = "\x1B[90mtab agents ctrl+p commands\x1B[0m";
|
|
40764
40764
|
const hintsPadding = Math.max(0, Math.floor((termWidth - 30) / 2));
|
|
40765
40765
|
process.stdout.write(" ".repeat(hintsPadding) + hints + "\n\n");
|
|
40766
40766
|
process.stdout.write("\x1B[?25h");
|
|
40767
|
-
process.stdout.write("\x1B[
|
|
40767
|
+
process.stdout.write("\x1B[90m" + "\u2500".repeat(termWidth) + "\x1B[0m\n");
|
|
40768
40768
|
process.stdout.write(
|
|
40769
|
-
"\x1B[
|
|
40769
|
+
"\x1B[90m" + process.cwd().replace(/^\/home\/[^/]+/, "~") + " \x1B[32m\u25CF\x1B[0m 0 MCP /status" + " ".repeat(Math.max(0, termWidth - 50)) + "0.1.0\x1B[0m"
|
|
40770
40770
|
);
|
|
40771
40771
|
const rl = readline.createInterface({
|
|
40772
40772
|
input: process.stdin,
|
|
@@ -40777,7 +40777,7 @@ async function startSimpleTUI(model, agentId) {
|
|
|
40777
40777
|
const trimmed = input.trim();
|
|
40778
40778
|
if (trimmed === "exit" || trimmed === "quit") {
|
|
40779
40779
|
process.stdout.write("\x1B[?25l");
|
|
40780
|
-
console.log("\n\x1B[
|
|
40780
|
+
console.log("\n\x1B[90mGoodbye!\x1B[0m");
|
|
40781
40781
|
process.stdout.write("\x1B[?25h");
|
|
40782
40782
|
rl.close();
|
|
40783
40783
|
process.exit(0);
|
|
@@ -40788,8 +40788,8 @@ async function startSimpleTUI(model, agentId) {
|
|
|
40788
40788
|
}
|
|
40789
40789
|
process.stdout.write("\x1B[2J");
|
|
40790
40790
|
process.stdout.write("\x1B[H");
|
|
40791
|
-
console.log("\x1B[
|
|
40792
|
-
console.log(`\x1B[36m\u25A0 ${agentName}\x1B[0m \x1B[
|
|
40791
|
+
console.log("\x1B[90m" + trimmed + "\x1B[0m\n");
|
|
40792
|
+
console.log(`\x1B[36m\u25A0 ${agentName}\x1B[0m \x1B[90m\xB7\x1B[0m \x1B[37m${modelName}\x1B[0m
|
|
40793
40793
|
`);
|
|
40794
40794
|
try {
|
|
40795
40795
|
let response = "";
|
|
@@ -40804,18 +40804,18 @@ async function startSimpleTUI(model, agentId) {
|
|
|
40804
40804
|
`);
|
|
40805
40805
|
}
|
|
40806
40806
|
process.stdout.write("\n");
|
|
40807
|
-
process.stdout.write(" ".repeat(boxPadding) + "\x1B[
|
|
40807
|
+
process.stdout.write(" ".repeat(boxPadding) + "\x1B[90m\u250C" + "\u2500".repeat(boxWidth - 2) + "\u2510\x1B[0m\n");
|
|
40808
40808
|
process.stdout.write(
|
|
40809
|
-
" ".repeat(boxPadding) + '\x1B[
|
|
40809
|
+
" ".repeat(boxPadding) + '\x1B[90m\u2502\x1B[0m \x1B[90mAsk anything... "What is the tech stack of this project?"\x1B[0m' + " ".repeat(Math.max(0, boxWidth - 50)) + "\x1B[90m\u2502\x1B[0m\n"
|
|
40810
40810
|
);
|
|
40811
|
-
process.stdout.write(" ".repeat(boxPadding) + "\x1B[
|
|
40811
|
+
process.stdout.write(" ".repeat(boxPadding) + "\x1B[90m\u2514" + "\u2500".repeat(boxWidth - 2) + "\u2518\x1B[0m\n");
|
|
40812
40812
|
process.stdout.write("\n");
|
|
40813
40813
|
prompt();
|
|
40814
40814
|
});
|
|
40815
40815
|
};
|
|
40816
40816
|
rl.on("SIGINT", () => {
|
|
40817
40817
|
process.stdout.write("\x1B[?25l");
|
|
40818
|
-
console.log("\n\x1B[
|
|
40818
|
+
console.log("\n\x1B[90mGoodbye!\x1B[0m");
|
|
40819
40819
|
process.stdout.write("\x1B[?25h");
|
|
40820
40820
|
rl.close();
|
|
40821
40821
|
process.exit(0);
|
|
@@ -40831,12 +40831,11 @@ var init_simple_tui = __esm({
|
|
|
40831
40831
|
init_tool();
|
|
40832
40832
|
init_agent();
|
|
40833
40833
|
BANNER = `
|
|
40834
|
-
|
|
40835
|
-
|
|
40836
|
-
|
|
40837
|
-
|
|
40838
|
-
|
|
40839
|
-
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
40834
|
+
____ _ __ __ ____ _ __
|
|
40835
|
+
| __ ) _ __ _____ _(_)___/ /__ / / | __ )_ __(_)___ ____ _/ /_____ _____
|
|
40836
|
+
| _ \\| '__/ _ \\ \\ / / / __/ //_/ / / | _ \\| '__/ __ \\ / __ \`/ __/ __ \\/ ___/
|
|
40837
|
+
| |_) | | | (_) \\ V / / /__/ , < / / | |_) | | | / / / / /_/ / /_/ /_/ / /
|
|
40838
|
+
|____/|_| \\___/ \\_/_/\\___/_/|_| /_/ |____/|_| /_/ /_/\\__,_/\\__/\\____/_/
|
|
40840
40839
|
`;
|
|
40841
40840
|
}
|
|
40842
40841
|
});
|