@ghl-ai/aw 0.1.36-beta.42 → 0.1.36-beta.43

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/fmt.mjs +30 -9
  2. package/package.json +1 -1
package/fmt.mjs CHANGED
@@ -8,6 +8,19 @@ export { chalk };
8
8
 
9
9
  // ─── Banner ───
10
10
 
11
+ // Big ASCII art icons — same height as ANSI Shadow font (6 lines)
12
+ // Placed BEFORE the text, same scale as the letters
13
+ const ICON_ART = {
14
+ '⟁': [
15
+ ' ▲ ',
16
+ ' ▲▲▲ ',
17
+ ' ▲▲▲▲▲ ',
18
+ ' ▲▲▲▲▲▲▲ ',
19
+ ' ▲▲▲▲▲▲▲▲▲ ',
20
+ '▲▲▲▲▲▲▲▲▲▲▲',
21
+ ],
22
+ };
23
+
11
24
  export function banner(text, opts = {}) {
12
25
  const {
13
26
  font = 'ANSI Shadow',
@@ -21,19 +34,27 @@ export function banner(text, opts = {}) {
21
34
  const art = figlet.textSync(text, { font, horizontalLayout: 'default' });
22
35
  const divider = chalk.dim(dividerChar.repeat(Math.min(cols, 80)));
23
36
 
24
- let artStr = art;
25
- if (icon) {
26
- const lines = art.split('\n');
27
- // Find the longest non-empty line so the icon aligns consistently
28
- const maxLen = Math.max(...lines.map(l => l.length));
29
- const midIdx = Math.floor((lines.filter(l => l.trim()).length - 1) / 2);
30
- lines[midIdx] = lines[midIdx].padEnd(maxLen) + ' ' + chalk.bold(icon);
31
- artStr = lines.join('\n');
37
+ let artStr;
38
+ if (icon && ICON_ART[icon]) {
39
+ // Prepend big icon art side-by-side with the text art
40
+ const iconLines = [...ICON_ART[icon]];
41
+ const textLines = art.split('\n');
42
+ // Strip trailing empty lines from figlet output
43
+ while (textLines.length > 0 && !textLines[textLines.length - 1].trim()) textLines.pop();
44
+ // Pad both sides to the same height
45
+ const maxH = Math.max(iconLines.length, textLines.length);
46
+ const iconW = iconLines[0].length;
47
+ while (iconLines.length < maxH) iconLines.unshift(' '.repeat(iconW));
48
+ while (textLines.length < maxH) textLines.push('');
49
+ // Combine side by side
50
+ artStr = iconLines.map((il, i) => `${color(il)} ${color(textLines[i])}`).join('\n');
51
+ } else {
52
+ artStr = color(art);
32
53
  }
33
54
 
34
55
  console.log('');
35
56
  console.log(divider);
36
- console.log(color(artStr));
57
+ console.log(artStr);
37
58
  console.log(divider);
38
59
  if (subtitle) {
39
60
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.36-beta.42",
3
+ "version": "0.1.36-beta.43",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",