bravecode-cli 0.1.5 → 0.1.6

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 CHANGED
@@ -40726,17 +40726,42 @@ async function startSimpleTUI(model, agentId) {
40726
40726
  ...agentConfig,
40727
40727
  model: modelName
40728
40728
  });
40729
- console.log(`Agent: ${agentName} | Model: ${modelName}`);
40730
- console.log("Type your message and press Enter. Type 'exit' or press Ctrl+C to quit.\n");
40729
+ const termWidth = process.stdout.columns || 80;
40730
+ console.clear();
40731
+ const bannerLines = BANNER.trim().split("\n");
40732
+ const maxBannerWidth = Math.max(...bannerLines.map((l) => l.length));
40733
+ const bannerPadding = Math.max(0, Math.floor((termWidth - maxBannerWidth) / 2));
40734
+ console.log("\n".repeat(3));
40735
+ for (const line of bannerLines) {
40736
+ console.log(" ".repeat(bannerPadding) + "\x1B[1m\x1B[37m" + line + "\x1B[0m");
40737
+ }
40738
+ console.log("\n".repeat(2));
40739
+ const boxWidth = Math.min(60, termWidth - 4);
40740
+ const boxPadding = Math.max(0, Math.floor((termWidth - boxWidth) / 2));
40741
+ console.log(" ".repeat(boxPadding) + "\x1B[90m\u250C" + "\u2500".repeat(boxWidth - 2) + "\u2510\x1B[0m");
40742
+ console.log(
40743
+ " ".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 - 48)) + "\x1B[90m\u2502\x1B[0m"
40744
+ );
40745
+ console.log(" ".repeat(boxPadding) + "\x1B[90m\u2514" + "\u2500".repeat(boxWidth - 2) + "\u2518\x1B[0m");
40746
+ console.log("");
40747
+ console.log(
40748
+ " ".repeat(boxPadding) + "\x1B[36m" + agentName + "\x1B[0m \x1B[90m\xB7\x1B[0m \x1B[37m" + modelName + "\x1B[0m"
40749
+ );
40750
+ console.log("");
40751
+ console.log(" ".repeat(boxPadding) + "\x1B[90mtab agents ctrl+p commands\x1B[0m");
40752
+ console.log("\n");
40731
40753
  const rl = readline.createInterface({
40732
40754
  input: process.stdin,
40733
40755
  output: process.stdout
40734
40756
  });
40757
+ if (process.stdin.isTTY) {
40758
+ process.stdin.setRawMode(true);
40759
+ }
40735
40760
  const prompt = () => {
40736
- rl.question("\x1B[32m>\x1B[0m ", async (input) => {
40761
+ rl.question("\x1B[36m>\x1B[0m ", async (input) => {
40737
40762
  const trimmed = input.trim();
40738
40763
  if (trimmed === "exit" || trimmed === "quit") {
40739
- console.log("\nGoodbye!");
40764
+ console.log("\n\x1B[90mGoodbye!\x1B[0m");
40740
40765
  rl.close();
40741
40766
  process.exit(0);
40742
40767
  }
@@ -40744,6 +40769,7 @@ async function startSimpleTUI(model, agentId) {
40744
40769
  prompt();
40745
40770
  return;
40746
40771
  }
40772
+ console.log("\x1B[90m" + trimmed + "\x1B[0m\n");
40747
40773
  try {
40748
40774
  let response = "";
40749
40775
  await agent.run(trimmed, (chunk) => {
@@ -40753,20 +40779,20 @@ async function startSimpleTUI(model, agentId) {
40753
40779
  console.log("\n");
40754
40780
  } catch (error40) {
40755
40781
  console.error(`
40756
- Error: ${error40.message}
40782
+ \x1B[31mError: ${error40.message}\x1B[0m
40757
40783
  `);
40758
40784
  }
40759
40785
  prompt();
40760
40786
  });
40761
40787
  };
40762
40788
  rl.on("SIGINT", () => {
40763
- console.log("\nGoodbye!");
40789
+ console.log("\n\x1B[90mGoodbye!\x1B[0m");
40764
40790
  rl.close();
40765
40791
  process.exit(0);
40766
40792
  });
40767
40793
  prompt();
40768
40794
  }
40769
- var readline;
40795
+ var readline, BANNER;
40770
40796
  var init_simple_tui = __esm({
40771
40797
  "src/core/tui/simple-tui.ts"() {
40772
40798
  "use strict";
@@ -40774,6 +40800,13 @@ var init_simple_tui = __esm({
40774
40800
  init_provider();
40775
40801
  init_tool();
40776
40802
  init_agent();
40803
+ BANNER = `
40804
+ ____ _ _____________
40805
+ / __ )________ ____ ___ ____| | / /__ /__ /
40806
+ / __ / ___/ _ \\/ __ \\/ __ \\/ |/ / / /_ / / /
40807
+ / /_/ / / / __/ /_/ / / / /| / / __/ / / /_
40808
+ /_____/_/ \\___/\\____/_/ /_/_/|_/ /____/ /____/
40809
+ `;
40777
40810
  }
40778
40811
  });
40779
40812
 
@@ -41398,16 +41431,15 @@ var UpdateChecker = class {
41398
41431
  var import_fs9 = require("fs");
41399
41432
  var import_path7 = require("path");
41400
41433
  var program2 = new Command();
41401
- var BANNER = `
41402
- \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557
41403
- \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557
41404
- \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
41405
- \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
41406
- \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
41407
- \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D
41434
+ var BANNER2 = `
41435
+ ____ _ _____________
41436
+ / __ )________ ____ ___ ____| | / /__ /__ /
41437
+ / __ / ___/ _ \\/ __ \\/ __ \\/ |/ / / /_ / / /
41438
+ / /_/ / / / __/ /_/ / / / /| / / __/ / / /_
41439
+ /_____/_/ \\___/\\____/_/ /_/_/|_/ /____/ /____/
41408
41440
  `;
41409
41441
  program2.name("bravecode").description("BraveCode AI - Agentic AI Vibe Coding CLI with free model support").version("0.1.2").action(async () => {
41410
- console.log(BANNER);
41442
+ console.log(BANNER2);
41411
41443
  const { startSimpleTUI: startSimpleTUI2 } = await Promise.resolve().then(() => (init_simple_tui(), simple_tui_exports));
41412
41444
  await startSimpleTUI2();
41413
41445
  });