blun-king-cli 5.0.2 → 5.0.4

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.
Files changed (2) hide show
  1. package/blun-cli.js +24 -20
  2. package/package.json +1 -1
package/blun-cli.js CHANGED
@@ -536,14 +536,31 @@ async function main() {
536
536
  });
537
537
  }
538
538
 
539
+ // ── Header ──
540
+ console.log("");
541
+ console.log(" \x1b[36m\x1b[1m╔══════════════════════════════════════╗\x1b[0m");
542
+ console.log(" \x1b[36m\x1b[1m║ BLUN KING CLI v5.0.4 ║\x1b[0m");
543
+ console.log(" \x1b[36m\x1b[1m║ Your Local AI Assistant ║\x1b[0m");
544
+ console.log(" \x1b[36m\x1b[1m╚══════════════════════════════════════╝\x1b[0m");
545
+ console.log("");
546
+
547
+ // ── API Connection ──
548
+ try {
549
+ const health = await fetch(`${cfg.apiUrl}/health`).then((resp) => resp.json());
550
+ console.log(` \x1b[32m\u2713\x1b[0m Connected to BLUN King API (\x1b[97m${health.model}\x1b[0m)`);
551
+ } catch (error) {
552
+ console.error(` \x1b[31m\u2717\x1b[0m API connection failed: ${error.message}`);
553
+ }
554
+ console.log("");
555
+
539
556
  // ── Trust Prompt ──
540
557
  const TRUST_FILE = path.join(HOME, "trusted.json");
541
558
  let trustedDirs = [];
542
559
  try { if (fs.existsSync(TRUST_FILE)) trustedDirs = JSON.parse(fs.readFileSync(TRUST_FILE, "utf8")); } catch {}
543
560
  const isTrusted = trustedDirs.includes(workdir) || process.argv.includes("--trust");
544
561
 
545
- if (!isTrusted && process.stdin.isTTY) {
546
- console.log("");
562
+ const isTTY = process.stdin.isTTY || process.stdout.isTTY || process.platform === "win32";
563
+ if (!isTrusted && isTTY) {
547
564
  console.log(` \x1b[33m\u{1F4C1} Working in: \x1b[97m${workdir}\x1b[0m`);
548
565
  console.log(" \x1b[90mDo you trust this folder? BLUN King will read/write files here.\x1b[0m");
549
566
  console.log("");
@@ -570,10 +587,13 @@ async function main() {
570
587
  }
571
588
  }
572
589
  console.log("");
590
+ } else if (isTTY) {
591
+ console.log(` \x1b[32m\u2713\x1b[0m Workspace: \x1b[97m${workdir}\x1b[0m (trusted)`);
592
+ console.log("");
573
593
  }
574
594
 
575
- // ── Mode Selection ──
576
- if (!process.argv.includes("--agent") && !process.argv.includes("--chat") && process.stdin.isTTY) {
595
+ // ── Mode Selection (ALWAYS shown) ──
596
+ if (!process.argv.includes("--agent") && !process.argv.includes("--chat") && isTTY) {
577
597
  console.log(" \x1b[97m\x1b[1mHow do you want to work?\x1b[0m");
578
598
  console.log("");
579
599
  const modeChoice = await arrowMenu([
@@ -585,22 +605,6 @@ async function main() {
585
605
  console.log("");
586
606
  }
587
607
  if (process.argv.includes("--chat")) mode = "chat";
588
-
589
- // ── Startup ──
590
- try {
591
- const health = await fetch(`${cfg.apiUrl}/health`).then((resp) => resp.json());
592
- console.log(` Connected to BLUN King API (${health.model})`);
593
- } catch (error) {
594
- console.error(` API connection failed: ${error.message}`);
595
- }
596
-
597
- console.log("");
598
- console.log(" BLUN KING CLI v5.0.1");
599
- console.log(` API: ${cfg.apiUrl}`);
600
- console.log(` Dir: ${workdir}`);
601
- console.log(" Chat input stays available while jobs run.");
602
- console.log(" Normal input goes into pending. /btw uses an immediate side lane.");
603
- console.log("");
604
608
  renderPrompt();
605
609
 
606
610
  rl.on("close", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "BLUN King CLI — Your local AI assistant powered by Gemma4",
5
5
  "type": "commonjs",
6
6
  "bin": {