matex-cli 1.2.42 → 1.2.44

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/src/utils/tui.ts CHANGED
@@ -47,7 +47,7 @@ export class TUI {
47
47
  █▀▄▀█ ▄▀█ ▀█▀ █▀▀ ▀▄▀ ▄▀█ █
48
48
  █ ▀ █ █▀█ █ ██▄ █ █ █▀█ █
49
49
  `;
50
- console.log(chalk.hex('#D97757').bold(logo));
50
+ console.log(chalk.hex('#0de306ff').bold(logo));
51
51
  }
52
52
 
53
53
  /**
@@ -93,29 +93,108 @@ export class TUI {
93
93
  }
94
94
 
95
95
  /**
96
- * Draw a clean code block
96
+ * Draw a premium glowing code container (turns cyan)
97
97
  */
98
- static drawCodeContainer(title: string, lang: string, code: string) {
99
- console.log('\n' + chalk.cyan.bold(`[ FILE: ${title} (${lang}) ]`));
100
- const lines = code.split('\n');
101
- lines.forEach(line => {
102
- console.log(chalk.hex('#e0e0e0')(line));
98
+ static drawGlowingContainer(title: string, language: string, content: string) {
99
+ const width = Math.min(process.stdout.columns || 80, 100);
100
+ const innerWidth = width - 4;
101
+
102
+ // Premium Cyan Glow
103
+ const glow = chalk.hex('#06b6d4');
104
+ const bright = chalk.hex('#22d3ee');
105
+ const dark = chalk.hex('#164e63');
106
+
107
+ console.log();
108
+ // Top shadow/glow
109
+ console.log(dark(` .${'·'.repeat(width - 4)}.`));
110
+ // Header
111
+ const headerText = ` ${title} [${language}] `;
112
+ const headerPad = Math.max(0, innerWidth - headerText.length);
113
+ console.log(glow(' ╭─') + bright.bold.bgHex('#083344')(headerText) + glow('─'.repeat(headerPad - 2)) + glow('╮'));
114
+
115
+ // Content
116
+ const lines = content.split('\n');
117
+ // Limit display to 20 lines to keep it small/compact
118
+ const displayLines = lines.length > 20 ? lines.slice(0, 18) : lines;
119
+
120
+ displayLines.forEach(line => {
121
+ // Trim to width
122
+ const displayLine = line.length > innerWidth - 2 ? line.substring(0, innerWidth - 5) + '...' : line;
123
+ const pad = Math.max(0, innerWidth - 2 - displayLine.length);
124
+ console.log(glow(' │ ') + chalk.white(displayLine) + ' '.repeat(pad) + glow(' │'));
103
125
  });
104
- console.log(chalk.gray('---------------------------------\n'));
126
+
127
+ if (lines.length > 20) {
128
+ const hiddenText = chalk.italic.gray(`... ${lines.length - 18} more lines ...`);
129
+ const pad = Math.max(0, innerWidth - 2 - (`... ${lines.length - 18} more lines ...`).length);
130
+ console.log(glow(' │ ') + hiddenText + ' '.repeat(pad) + glow(' │'));
131
+ }
132
+
133
+ // Footer
134
+ console.log(glow(' ╰' + '─'.repeat(innerWidth) + '╯'));
135
+ console.log(dark(` '${'·'.repeat(width - 4)}'`));
136
+ console.log();
105
137
  }
106
138
 
107
139
  /**
108
- * Draw a clean summary report
140
+ * Draw Ajay Vai's premium summary with a human chat bubble vibe
109
141
  */
110
142
  static drawSummaryBox(content: string) {
111
- console.log('\n' + chalk.magenta.bold('== AJAY VAI\'S WORK SUMMARY =='));
143
+ const width = Math.min(process.stdout.columns || 80, 76);
144
+ const innerWidth = width - 6;
145
+ const magenta = chalk.hex('#ff69b4');
146
+ const pinkBright = chalk.hex('#ff99cc');
147
+ const pinkGlow = chalk.hex('#ffccee');
148
+
149
+ console.log();
150
+ // Timestamp for chat realism
151
+ const time = new Date().toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' });
152
+ console.log(chalk.gray(` ╭─ [${time}] ──────────────────────────────`));
153
+
154
+ // Header mimicking WhatsApp / iMessage chat interface
155
+ const headerText = '🚀 Ajay Vai';
156
+ const typingText = chalk.italic.gray('sent you a message');
157
+ console.log(` │ ${magenta.bold(headerText)} ${typingText}`);
158
+
159
+ // Chat bubble top
160
+ console.log(pinkGlow(` ╭${'─'.repeat(width - 4)}╮`));
161
+
162
+ // Content with chat bubble formatting
112
163
  const lines = content.split('\n');
113
164
  lines.forEach(line => {
114
- if (line.trim()) {
115
- console.log(chalk.white(line.trim()));
116
- }
165
+ if (!line.trim()) return;
166
+ const trimmed = line.trim();
167
+
168
+ // Word wrap
169
+ const words = trimmed.split(' ');
170
+ let currentLine = '';
171
+ const wrappedLines: string[] = [];
172
+
173
+ words.forEach(word => {
174
+ if ((currentLine + ' ' + word).trim().length <= innerWidth) {
175
+ currentLine = currentLine ? currentLine + ' ' + word : word;
176
+ } else {
177
+ if (currentLine) wrappedLines.push(currentLine);
178
+ currentLine = word.length > innerWidth ? word.substring(0, innerWidth) : word;
179
+ }
180
+ });
181
+ if (currentLine) wrappedLines.push(currentLine);
182
+
183
+ wrappedLines.forEach(wl => {
184
+ const linePad = Math.max(0, innerWidth - wl.length);
185
+ // Keep bullet formatting but tone down the robotic feel
186
+ if (wl.startsWith('- ') || wl.startsWith('• ') || wl.match(/^\d+\./)) {
187
+ console.log(pinkGlow(' │ ') + magenta('• ') + chalk.white(wl.replace(/^[-•]\s*/, '').replace(/^\d+\.\s*/, '')) + ' '.repeat(Math.max(0, linePad - 2)) + pinkGlow(' │'));
188
+ } else {
189
+ console.log(pinkGlow(' │ ') + chalk.white(wl) + ' '.repeat(linePad) + pinkGlow(' │'));
190
+ }
191
+ });
117
192
  });
118
- console.log(chalk.magenta.bold('=================================\n'));
193
+
194
+ // Chat bubble bottom
195
+ console.log(pinkGlow(` ╰${'─'.repeat(width - 4)}╯`));
196
+ console.log(chalk.gray(` ╰──────────────────────────────────────────`));
197
+ console.log();
119
198
  }
120
199
 
121
200
  /**
@@ -131,7 +210,7 @@ export class TUI {
131
210
  }
132
211
 
133
212
  /**
134
- * Draw a beautiful, compact internal dialogue container for the Swarm
213
+ * Draw a premium glowing dialogue container for Swarm agents
135
214
  */
136
215
  static drawSwarmDialogue(agent: string, message: string) {
137
216
  const isBigBro = agent.includes('Big Bro');
@@ -144,7 +223,20 @@ export class TUI {
144
223
  agent.includes('Nerd') ? chalk.hex('#06b6d4') :
145
224
  agent.includes('Chill') ? chalk.hex('#22c55e') :
146
225
  agent.includes('Lil') ? chalk.hex('#888888') :
147
- chalk.green;
226
+ agent.includes('Narayan') ? chalk.green :
227
+ chalk.green;
228
+
229
+ // Glow color is a brighter version of the agent color
230
+ const glowColor = isBigBro ? chalk.hex('#FF9642') :
231
+ agent.includes('Ajay') ? chalk.hex('#ff77ff') :
232
+ agent.includes('Sunil') ? chalk.hex('#66aaff') :
233
+ agent.includes('Sandip') ? chalk.hex('#ff99cc') :
234
+ agent.includes('Bishal') ? chalk.hex('#ffee66') :
235
+ agent.includes('Hype') ? chalk.hex('#ffe066') :
236
+ agent.includes('Nerd') ? chalk.hex('#33ddee') :
237
+ agent.includes('Chill') ? chalk.hex('#66ff88') :
238
+ agent.includes('Lil') ? chalk.hex('#aaaaaa') :
239
+ chalk.hex('#66ff88');
148
240
 
149
241
  const icon = isBigBro ? '🔥' :
150
242
  agent.includes('Ajay') ? '🚀' :
@@ -154,19 +246,22 @@ export class TUI {
154
246
  agent.includes('Hype') ? '🎉' :
155
247
  agent.includes('Nerd') ? '🤓' :
156
248
  agent.includes('Chill') ? '😎' :
157
- agent.includes('Lil') ? '😰' : '🛡️';
249
+ agent.includes('Lil') ? '😰' :
250
+ agent.includes('Narayan') ? '🛡️' : '🛡️';
158
251
 
159
252
  const width = Math.min(process.stdout.columns || 80, 76);
160
253
  const innerWidth = width - 6;
161
254
 
162
- // Top border
163
- console.log(color(` ┌${''.repeat(width - 4)}┐`));
164
- // Header
255
+ // Top glow shimmer
256
+ console.log(glowColor(` ░${''.repeat(width - 4)}░`));
257
+ // Top border with premium double-line
258
+ console.log(color(` ╔${'═'.repeat(width - 4)}╗`));
259
+ // Header with agent name
165
260
  const headerText = `${icon} ${agent}`;
166
261
  const pad = Math.max(0, innerWidth - headerText.length);
167
- console.log(color(' ') + color.bold(headerText) + ' '.repeat(pad) + color(' '));
168
- // Separator
169
- console.log(color(` ├${''.repeat(width - 4)}┤`));
262
+ console.log(color(' ') + color.bold(headerText) + ' '.repeat(pad) + color(' '));
263
+ // Separator with dots for premium feel
264
+ console.log(color(' ') + glowColor('·'.repeat(width - 4)) + color('╣'));
170
265
 
171
266
  // Content lines with word wrap
172
267
  const words = message.split(' ');
@@ -185,11 +280,13 @@ export class TUI {
185
280
 
186
281
  wrappedLines.forEach(line => {
187
282
  const linePad = Math.max(0, innerWidth - line.length);
188
- console.log(color(' ') + chalk.gray(line) + ' '.repeat(linePad) + color(' '));
283
+ console.log(color(' ') + chalk.white(line) + ' '.repeat(linePad) + color(' '));
189
284
  });
190
285
 
191
286
  // Bottom border
192
- console.log(color(` └${''.repeat(width - 4)}┘`));
287
+ console.log(color(` ╚${''.repeat(width - 4)}╝`));
288
+ // Bottom glow shimmer
289
+ console.log(glowColor(` ░${'░'.repeat(width - 4)}░`));
193
290
  }
194
291
 
195
292
  /**