matex-cli 1.2.47 → 1.2.49
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/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +23 -18
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/study.d.ts.map +1 -1
- package/dist/commands/study.js +23 -19
- package/dist/commands/study.js.map +1 -1
- package/dist/utils/agent-orchestrator.d.ts.map +1 -1
- package/dist/utils/agent-orchestrator.js +1 -2
- package/dist/utils/agent-orchestrator.js.map +1 -1
- package/dist/utils/patcher.d.ts.map +1 -1
- package/dist/utils/patcher.js +22 -28
- package/dist/utils/patcher.js.map +1 -1
- package/dist/utils/tui.d.ts +16 -0
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +97 -75
- package/dist/utils/tui.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/dev.ts +21 -19
- package/src/commands/study.ts +21 -20
- package/src/utils/agent-orchestrator.ts +1 -2
- package/src/utils/patcher.ts +22 -32
- package/src/utils/tui.ts +105 -80
package/src/utils/tui.ts
CHANGED
|
@@ -96,51 +96,110 @@ export class TUI {
|
|
|
96
96
|
* Draw a premium glowing code container (turns cyan)
|
|
97
97
|
*/
|
|
98
98
|
static drawGlowingContainer(title: string, language: string, content: string) {
|
|
99
|
-
const width =
|
|
100
|
-
const innerWidth = width -
|
|
99
|
+
const width = 76;
|
|
100
|
+
const innerWidth = width - 8;
|
|
101
101
|
|
|
102
|
-
// Premium Cyan Glow
|
|
103
102
|
const glow = chalk.hex('#06b6d4');
|
|
104
|
-
const
|
|
105
|
-
const
|
|
103
|
+
const border = chalk.hex('#164e63');
|
|
104
|
+
const shadow = chalk.hex('#083344');
|
|
105
|
+
|
|
106
|
+
console.log('\n' + shadow(` ┌${'─'.repeat(width - 4)}┐`));
|
|
107
|
+
const header = ` ${title.toUpperCase()} • ${language} `;
|
|
108
|
+
const hPad = Math.max(0, width - 8 - header.length);
|
|
109
|
+
console.log(glow(' │ ') + chalk.bgHex('#164e63').white.bold(header) + border('─'.repeat(hPad)) + glow(' │'));
|
|
106
110
|
|
|
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
111
|
const lines = content.split('\n');
|
|
117
|
-
|
|
118
|
-
const displayLines = lines.length > 20 ? lines.slice(0, 18) : lines;
|
|
112
|
+
const displayLines = lines.length > 25 ? lines.slice(0, 23) : lines;
|
|
119
113
|
|
|
120
114
|
displayLines.forEach(line => {
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
console.log(glow(' │ ') + chalk.white(displayLine) + ' '.repeat(pad) + glow(' │'));
|
|
115
|
+
const displayLine = line.length > innerWidth ? line.substring(0, innerWidth - 3) + '...' : line;
|
|
116
|
+
const pad = Math.max(0, innerWidth - displayLine.length);
|
|
117
|
+
console.log(border(' │ ') + chalk.white(displayLine) + ' '.repeat(pad) + border(' │'));
|
|
125
118
|
});
|
|
126
119
|
|
|
127
|
-
if (lines.length >
|
|
128
|
-
|
|
129
|
-
const pad = Math.max(0, innerWidth - 2 - (`... ${lines.length - 18} more lines ...`).length);
|
|
130
|
-
console.log(glow(' │ ') + hiddenText + ' '.repeat(pad) + glow(' │'));
|
|
120
|
+
if (lines.length > 25) {
|
|
121
|
+
console.log(border(' │ ') + chalk.italic.gray(`... ${lines.length - 23} more lines ...`).padEnd(innerWidth) + border(' │'));
|
|
131
122
|
}
|
|
132
123
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
124
|
+
console.log(shadow(` └${'─'.repeat(width - 4)}┘\n`));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Nebula Thinking Box: Starry background effect for deliberation
|
|
129
|
+
*/
|
|
130
|
+
static drawThinkingBox(agent: string, thought: string) {
|
|
131
|
+
const width = Math.min(process.stdout.columns || 80, 70);
|
|
132
|
+
const innerWidth = width - 10;
|
|
133
|
+
const starColor = chalk.hex('#6366f1');
|
|
134
|
+
const nebulaColor = chalk.hex('#a855f7');
|
|
135
|
+
|
|
136
|
+
console.log('\n' + starColor(` ✧ . * . ✧ . * . ✧`));
|
|
137
|
+
console.log(nebulaColor(` ╭${'─'.repeat(width - 4)}╮`));
|
|
138
|
+
console.log(nebulaColor(' │ ') + nebulaColor.bold(`[ ${agent} is deliberating... ]`).padEnd(width - 6) + nebulaColor(' │'));
|
|
139
|
+
console.log(nebulaColor(' ├' + '╌'.repeat(width - 4) + '┤'));
|
|
140
|
+
|
|
141
|
+
const words = thought.split(' ');
|
|
142
|
+
let currentLine = '';
|
|
143
|
+
words.forEach(word => {
|
|
144
|
+
if ((currentLine + ' ' + word).trim().length <= innerWidth) {
|
|
145
|
+
currentLine = currentLine ? currentLine + ' ' + word : word;
|
|
146
|
+
} else {
|
|
147
|
+
if (currentLine) console.log(nebulaColor(' │ ') + chalk.italic.dim(currentLine.padEnd(innerWidth)) + nebulaColor(' │'));
|
|
148
|
+
currentLine = word;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
if (currentLine) console.log(nebulaColor(' │ ') + chalk.italic.dim(currentLine.padEnd(innerWidth)) + nebulaColor(' │'));
|
|
152
|
+
|
|
153
|
+
console.log(nebulaColor(` ╰${'─'.repeat(width - 4)}╯`));
|
|
154
|
+
console.log(starColor(` * . ✧ . * . ✧ . *`));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Live Streaming: Start a technical block container
|
|
159
|
+
*/
|
|
160
|
+
static drawStreamingStart(title: string, language: string) {
|
|
161
|
+
const width = 76;
|
|
162
|
+
const glow = chalk.hex('#06b6d4');
|
|
163
|
+
const border = chalk.hex('#164e63');
|
|
164
|
+
const shadow = chalk.hex('#083344');
|
|
165
|
+
|
|
166
|
+
console.log('\n' + shadow(` ┌${'─'.repeat(width - 4)}┐`));
|
|
167
|
+
const header = ` ${title.toUpperCase()} • ${language} `;
|
|
168
|
+
const hPad = Math.max(0, width - 8 - header.length);
|
|
169
|
+
console.log(glow(' │ ') + chalk.bgHex('#164e63').white.bold(header) + border('─'.repeat(hPad)) + glow(' │'));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Live Streaming: Add a line to the active container
|
|
174
|
+
*/
|
|
175
|
+
static drawStreamingLine(content: string) {
|
|
176
|
+
const width = 76;
|
|
177
|
+
const innerWidth = width - 8;
|
|
178
|
+
const border = chalk.hex('#164e63');
|
|
179
|
+
|
|
180
|
+
// Handle multi-line content if passed
|
|
181
|
+
const lines = content.split('\n');
|
|
182
|
+
lines.forEach(line => {
|
|
183
|
+
const displayLine = line.length > innerWidth ? line.substring(0, innerWidth - 3) + '...' : line;
|
|
184
|
+
const pad = Math.max(0, innerWidth - displayLine.length);
|
|
185
|
+
console.log(border(' │ ') + chalk.white(displayLine) + ' '.repeat(pad) + border(' │'));
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Live Streaming: Close the container
|
|
191
|
+
*/
|
|
192
|
+
static drawStreamingEnd() {
|
|
193
|
+
const width = 76;
|
|
194
|
+
const shadow = chalk.hex('#083344');
|
|
195
|
+
console.log(shadow(` └${'─'.repeat(width - 4)}┘\n`));
|
|
137
196
|
}
|
|
138
197
|
|
|
139
198
|
/**
|
|
140
199
|
* Draw Ajay Vai's premium summary with a human chat bubble vibe
|
|
141
200
|
*/
|
|
142
201
|
static drawSummaryBox(content: string) {
|
|
143
|
-
const width =
|
|
202
|
+
const width = 74;
|
|
144
203
|
const innerWidth = width - 6;
|
|
145
204
|
const magenta = chalk.hex('#ff69b4');
|
|
146
205
|
const pinkBright = chalk.hex('#ff99cc');
|
|
@@ -219,74 +278,40 @@ export class TUI {
|
|
|
219
278
|
agent.includes('Sunil') ? chalk.blue :
|
|
220
279
|
agent.includes('Sandip') ? chalk.hex('#FF69B4') :
|
|
221
280
|
agent.includes('Bishal') ? chalk.yellow :
|
|
222
|
-
agent.includes('
|
|
223
|
-
agent.includes('Nerd') ? chalk.hex('#06b6d4') :
|
|
224
|
-
agent.includes('Chill') ? chalk.hex('#22c55e') :
|
|
225
|
-
agent.includes('Lil') ? chalk.hex('#888888') :
|
|
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');
|
|
281
|
+
agent.includes('Narayan') ? chalk.green : chalk.cyan;
|
|
240
282
|
|
|
283
|
+
const glowColor = isBigBro ? chalk.hex('#fbbf24') : color;
|
|
241
284
|
const icon = isBigBro ? '🔥' :
|
|
242
285
|
agent.includes('Ajay') ? '🚀' :
|
|
243
286
|
agent.includes('Sunil') ? '🧬' :
|
|
244
287
|
agent.includes('Sandip') ? '🎨' :
|
|
245
288
|
agent.includes('Bishal') ? '🛠️' :
|
|
246
|
-
agent.includes('
|
|
247
|
-
agent.includes('Nerd') ? '🤓' :
|
|
248
|
-
agent.includes('Chill') ? '😎' :
|
|
249
|
-
agent.includes('Lil') ? '😰' :
|
|
250
|
-
agent.includes('Narayan') ? '🛡️' : '🛡️';
|
|
289
|
+
agent.includes('Narayan') ? '🛡️' : '🤖';
|
|
251
290
|
|
|
252
|
-
const width =
|
|
253
|
-
const innerWidth = width -
|
|
291
|
+
const width = 76;
|
|
292
|
+
const innerWidth = width - 10;
|
|
254
293
|
|
|
255
|
-
//
|
|
256
|
-
console.log(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
// Separator with dots for premium feel
|
|
264
|
-
console.log(color(' ╠') + glowColor('·'.repeat(width - 4)) + color('╣'));
|
|
265
|
-
|
|
266
|
-
// Content lines with word wrap
|
|
294
|
+
// Robust Elite Header
|
|
295
|
+
console.log('\n' + color(` ┌${'─'.repeat(width - 4)}┐`));
|
|
296
|
+
const header = ` ${icon} ${agent.toUpperCase()} `;
|
|
297
|
+
const hPad = Math.max(0, width - 8 - header.length);
|
|
298
|
+
console.log(color(' │ ') + chalk.bgHex('#1a1a1a').white.bold(header) + color('╊'.repeat(hPad)) + color(' │'));
|
|
299
|
+
console.log(color(' │ ') + glowColor('─'.repeat(width - 6)) + color(' │'));
|
|
300
|
+
|
|
301
|
+
// Wrapped Content
|
|
267
302
|
const words = message.split(' ');
|
|
268
303
|
let currentLine = '';
|
|
269
|
-
const wrappedLines: string[] = [];
|
|
270
|
-
|
|
271
304
|
words.forEach(word => {
|
|
272
305
|
if ((currentLine + ' ' + word).trim().length <= innerWidth) {
|
|
273
306
|
currentLine = currentLine ? currentLine + ' ' + word : word;
|
|
274
307
|
} else {
|
|
275
|
-
if (currentLine)
|
|
276
|
-
currentLine = word
|
|
308
|
+
if (currentLine) console.log(color(' │ ') + chalk.white(currentLine.padEnd(innerWidth)) + color(' │'));
|
|
309
|
+
currentLine = word;
|
|
277
310
|
}
|
|
278
311
|
});
|
|
279
|
-
if (currentLine)
|
|
280
|
-
|
|
281
|
-
wrappedLines.forEach(line => {
|
|
282
|
-
const linePad = Math.max(0, innerWidth - line.length);
|
|
283
|
-
console.log(color(' ║ ') + chalk.white(line) + ' '.repeat(linePad) + color(' ║'));
|
|
284
|
-
});
|
|
312
|
+
if (currentLine) console.log(color(' │ ') + chalk.white(currentLine.padEnd(innerWidth)) + color(' │'));
|
|
285
313
|
|
|
286
|
-
|
|
287
|
-
console.log(color(` ╚${'═'.repeat(width - 4)}╝`));
|
|
288
|
-
// Bottom glow shimmer
|
|
289
|
-
console.log(glowColor(` ░${'░'.repeat(width - 4)}░`));
|
|
314
|
+
console.log(color(` └${'─'.repeat(width - 4)}┘\n`));
|
|
290
315
|
}
|
|
291
316
|
|
|
292
317
|
/**
|