kafox-cli 0.2.2 → 0.2.3

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 (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/tui.js +6 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@ npm install -g kafox-cli
12
12
  O comando instalado e `kafox`. Alternativa sem npm:
13
13
 
14
14
  ```bash
15
- npm install -g https://kafox.pypag.com/static/downloads/kafox-cli-0.2.2.tgz
15
+ npm install -g https://kafox.pypag.com/static/downloads/kafox-cli-0.2.3.tgz
16
16
  ```
17
17
 
18
18
  Requisito: Node.js 22.5+.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kafox-cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Kafox CLI in opencode style: full-screen terminal UI, device login, models, balance, themes",
5
5
  "bin": {
6
6
  "kafox": "bin/kafox.js"
package/src/tui.js CHANGED
@@ -87,7 +87,12 @@ function initialState() {
87
87
  function headerLines(state, width, rows, footerCount, compact) {
88
88
  if (state.messages.length || state.picker) return [];
89
89
 
90
- const art = mascot.split("\n").map((line) => chalk.white(line));
90
+ // Centraliza o bloco inteiro: as linhas tem larguras diferentes e cada uma
91
+ // precisa do mesmo recuo para a raposa nao sair distorcida.
92
+ const artLines = mascot.split("\n");
93
+ const artWidth = Math.max(...artLines.map((line) => line.length));
94
+ const artLeft = " ".repeat(Math.max(0, Math.floor((width - artWidth) / 2)));
95
+ const art = artLines.map((line) => artLeft + chalk.white(line));
91
96
  const space = rows - 2 - footerCount - (compact ? 0 : 1);
92
97
 
93
98
  if (space >= art.length + 4) {