matex-cli 1.2.17 → 1.2.19
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 +141 -58
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/help.d.ts +3 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +64 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/utils/tui.d.ts +13 -21
- package/dist/utils/tui.d.ts.map +1 -1
- package/dist/utils/tui.js +116 -93
- package/dist/utils/tui.js.map +1 -1
- package/package.json +2 -1
- package/src/commands/dev.ts +149 -63
- package/src/commands/help.ts +75 -0
- package/src/index.ts +32 -17
- package/src/utils/tui.ts +90 -99
package/dist/utils/tui.js
CHANGED
|
@@ -1,15 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.TUI = void 0;
|
|
7
40
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const
|
|
9
|
-
/**
|
|
10
|
-
* TUI Management for MATEX CLI "God-Mode"
|
|
11
|
-
* Handles screen buffers, persistent headers, and real-time status updates.
|
|
12
|
-
*/
|
|
41
|
+
const readline = __importStar(require("readline"));
|
|
13
42
|
class TUI {
|
|
14
43
|
/**
|
|
15
44
|
* Initialize the TUI Mode
|
|
@@ -17,11 +46,8 @@ class TUI {
|
|
|
17
46
|
static init() {
|
|
18
47
|
if (this.isInitialized)
|
|
19
48
|
return;
|
|
20
|
-
// Enter alternative screen buffer
|
|
21
|
-
process.stdout.write('\x1b[?1049h');
|
|
22
49
|
// Hide cursor
|
|
23
50
|
process.stdout.write('\x1b[?25l');
|
|
24
|
-
this.clear();
|
|
25
51
|
this.isInitialized = true;
|
|
26
52
|
// Ensure clean exit
|
|
27
53
|
process.on('SIGINT', () => this.exit());
|
|
@@ -35,124 +61,121 @@ class TUI {
|
|
|
35
61
|
return;
|
|
36
62
|
// Show cursor
|
|
37
63
|
process.stdout.write('\x1b[?25h');
|
|
38
|
-
// Exit alternative screen buffer
|
|
39
|
-
process.stdout.write('\x1b[?1049l');
|
|
40
64
|
this.isInitialized = false;
|
|
41
|
-
process.exit();
|
|
42
65
|
}
|
|
43
66
|
/**
|
|
44
|
-
* Clear the
|
|
67
|
+
* Clear the terminal
|
|
45
68
|
*/
|
|
46
69
|
static clear() {
|
|
47
|
-
process.stdout.write('\x1b[2J\x1b[
|
|
48
|
-
this.drawHeader();
|
|
49
|
-
this.drawStatusBar(this.currentStatus, true);
|
|
70
|
+
process.stdout.write('\x1b[2J\x1b[0;0H');
|
|
50
71
|
}
|
|
51
72
|
/**
|
|
52
|
-
* Draw the
|
|
73
|
+
* Draw a premium status bar at the bottom using Save/Restore cursor
|
|
53
74
|
*/
|
|
54
|
-
static
|
|
55
|
-
const width = process.stdout.columns || 80;
|
|
56
|
-
const banner = ` MATEX AI :: GOD-MODE DASHBOARD `;
|
|
57
|
-
const padding = Math.max(0, Math.floor((width - banner.length) / 2));
|
|
58
|
-
// Move to top
|
|
59
|
-
process.stdout.write('\x1b[H');
|
|
60
|
-
process.stdout.write(chalk_1.default.bgCyan.black(' '.repeat(padding) + banner + ' '.repeat(width - banner.length - padding)) + '\n');
|
|
61
|
-
process.stdout.write(chalk_1.default.gray('─'.repeat(width)) + '\n');
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Helper to draw a box with content
|
|
65
|
-
*/
|
|
66
|
-
static drawBox(title, color, lines, icon = '📦') {
|
|
67
|
-
const width = Math.min(process.stdout.columns || 80, 100);
|
|
68
|
-
console.log();
|
|
69
|
-
const trafficLights = chalk_1.default.red('●') + ' ' + chalk_1.default.yellow('●') + ' ' + chalk_1.default.green('●');
|
|
70
|
-
const displayTitle = ` ${icon} ${title} `;
|
|
71
|
-
console.log(chalk_1.default.gray('┏' + '━'.repeat(width - 2) + '┓'));
|
|
72
|
-
console.log(chalk_1.default.gray('┃ ') + trafficLights + ' ' + color(displayTitle).padEnd(width - 4) + chalk_1.default.gray(' ┃'));
|
|
73
|
-
console.log(chalk_1.default.gray('┣' + '━'.repeat(width - 2) + '┫'));
|
|
74
|
-
lines.forEach(line => {
|
|
75
|
-
const formattedLine = line.substring(0, width - 6);
|
|
76
|
-
console.log(chalk_1.default.gray('┃ ') + chalk_1.default.white(formattedLine).padEnd(width - 4) + chalk_1.default.gray(' ┃'));
|
|
77
|
-
});
|
|
78
|
-
console.log(chalk_1.default.gray('┗' + '━'.repeat(width - 2) + '┛'));
|
|
79
|
-
console.log();
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Draw a real-time status bar at the bottom
|
|
83
|
-
*/
|
|
84
|
-
static drawStatusBar(status, force = false) {
|
|
75
|
+
static drawStatusBar(message, force = false) {
|
|
85
76
|
if (!this.isInitialized)
|
|
86
77
|
return;
|
|
87
|
-
if (
|
|
78
|
+
if (!force && message === this.lastStatus)
|
|
88
79
|
return;
|
|
89
|
-
this.
|
|
80
|
+
this.lastStatus = message;
|
|
90
81
|
const width = process.stdout.columns || 80;
|
|
91
82
|
const height = process.stdout.rows || 24;
|
|
92
|
-
// Save cursor
|
|
83
|
+
// Save cursor (\x1b[s), move to bottom, write, restore cursor (\x1b[u)
|
|
93
84
|
process.stdout.write('\x1b[s');
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const barContent = ` [⚡] ${cleanStatus} `.padEnd(width);
|
|
98
|
-
process.stdout.write(chalk_1.default.bgWhite.black(barContent));
|
|
99
|
-
// Restore cursor position
|
|
85
|
+
readline.cursorTo(process.stdout, 0, height - 1);
|
|
86
|
+
process.stdout.write(chalk_1.default.bgBlue.white.bold(' 🧠 MATEX ') +
|
|
87
|
+
chalk_1.default.bgGray.white(` ${message.padEnd(width - 10)} `));
|
|
100
88
|
process.stdout.write('\x1b[u');
|
|
101
89
|
}
|
|
102
90
|
/**
|
|
103
|
-
* Draw a
|
|
91
|
+
* Draw a box with a title and content
|
|
104
92
|
*/
|
|
105
|
-
static
|
|
106
|
-
const
|
|
107
|
-
|
|
93
|
+
static drawBox(title, content, color = chalk_1.default.gray) {
|
|
94
|
+
const width = Math.min(process.stdout.columns || 80, 100);
|
|
95
|
+
const lines = content.split('\n');
|
|
96
|
+
console.log(color('┏' + '━'.repeat(width - 2) + '┓'));
|
|
97
|
+
console.log(color('┃ ') + chalk_1.default.bold(title).padEnd(width - 4) + color(' ┃'));
|
|
98
|
+
console.log(color('┣' + '━'.repeat(width - 2) + '┫'));
|
|
99
|
+
lines.forEach(line => {
|
|
100
|
+
const contentWidth = width - 4;
|
|
101
|
+
let remaining = line;
|
|
102
|
+
if (remaining.length === 0) {
|
|
103
|
+
console.log(color('┃ ') + ' '.repeat(contentWidth) + color(' ┃'));
|
|
104
|
+
}
|
|
105
|
+
while (remaining.length > 0) {
|
|
106
|
+
const chunk = remaining.substring(0, contentWidth);
|
|
107
|
+
console.log(color('┃ ') + chalk_1.default.white(chunk.padEnd(contentWidth)) + color(' ┃'));
|
|
108
|
+
remaining = remaining.substring(contentWidth);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
console.log(color('┗' + '━'.repeat(width - 2) + '┛'));
|
|
108
112
|
}
|
|
109
113
|
/**
|
|
110
|
-
* Draw a
|
|
114
|
+
* Draw a premium code container with traffic lights
|
|
111
115
|
*/
|
|
112
|
-
static
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
static drawCodeContainer(title, lang, code) {
|
|
117
|
+
const width = Math.min(process.stdout.columns || 80, 100);
|
|
118
|
+
const codeLines = code.split('\n');
|
|
119
|
+
const trafficLights = chalk_1.default.red('●') + ' ' + chalk_1.default.yellow('●') + ' ' + chalk_1.default.green('●');
|
|
120
|
+
const headerTitle = ` 📄 ${title} (${lang}) `;
|
|
121
|
+
console.log(chalk_1.default.gray('\n┏' + '━'.repeat(width - 2) + '┓'));
|
|
122
|
+
console.log(chalk_1.default.gray('┃ ') + trafficLights + ' ' + chalk_1.default.cyan.bold(headerTitle).padEnd(width - 10) + chalk_1.default.gray(' ┃'));
|
|
123
|
+
console.log(chalk_1.default.gray('┣' + '━'.repeat(width - 2) + '┫'));
|
|
124
|
+
codeLines.forEach(line => {
|
|
125
|
+
const contentWidth = width - 6;
|
|
126
|
+
let remaining = line;
|
|
127
|
+
if (remaining.length === 0) {
|
|
128
|
+
console.log(chalk_1.default.gray('┃ ') + ' '.repeat(contentWidth) + chalk_1.default.gray(' ┃'));
|
|
129
|
+
}
|
|
130
|
+
while (remaining.length > 0) {
|
|
131
|
+
const chunk = remaining.substring(0, contentWidth);
|
|
132
|
+
console.log(chalk_1.default.gray('┃ ') + chalk_1.default.hex('#e0e0e0')(chunk.padEnd(contentWidth)) + chalk_1.default.gray(' ┃'));
|
|
133
|
+
remaining = remaining.substring(contentWidth);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
console.log(chalk_1.default.gray('┗' + '━'.repeat(width - 2) + '┛\n'));
|
|
122
137
|
}
|
|
123
138
|
/**
|
|
124
|
-
*
|
|
139
|
+
* Draw a premium summary box for Ajay Vai's final report
|
|
125
140
|
*/
|
|
126
|
-
static
|
|
127
|
-
const
|
|
128
|
-
const lines =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
static drawSummaryBox(content) {
|
|
142
|
+
const width = Math.min(process.stdout.columns || 80, 100);
|
|
143
|
+
const lines = content.split('\n');
|
|
144
|
+
console.log(chalk_1.default.magenta.bold('\n┏━━━━━ ✅ AJAY VAI\'S WORK SUMMARY ━━━━━┓'));
|
|
145
|
+
lines.forEach(line => {
|
|
146
|
+
const contentWidth = width - 4;
|
|
147
|
+
let remaining = line.replace(/\*\*/g, ''); // Strip markdown bold for internal wrapping
|
|
148
|
+
if (remaining.trim().length === 0) {
|
|
149
|
+
console.log(chalk_1.default.magenta.bold('┃ ') + ' '.repeat(contentWidth) + chalk_1.default.magenta.bold(' ┃'));
|
|
133
150
|
}
|
|
134
151
|
else {
|
|
135
|
-
|
|
136
|
-
|
|
152
|
+
while (remaining.length > 0) {
|
|
153
|
+
const chunk = remaining.substring(0, contentWidth);
|
|
154
|
+
console.log(chalk_1.default.magenta.bold('┃ ') + chalk_1.default.white.bold(chunk.padEnd(contentWidth)) + chalk_1.default.magenta.bold(' ┃'));
|
|
155
|
+
remaining = remaining.substring(contentWidth);
|
|
156
|
+
}
|
|
137
157
|
}
|
|
138
158
|
});
|
|
139
|
-
|
|
140
|
-
lines.push(currentLine);
|
|
141
|
-
return lines;
|
|
159
|
+
console.log(chalk_1.default.magenta.bold('┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n'));
|
|
142
160
|
}
|
|
143
161
|
/**
|
|
144
|
-
*
|
|
162
|
+
* Draw a specialized message container for agents
|
|
145
163
|
*/
|
|
146
|
-
static
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
static drawMessageContainer(agent, message) {
|
|
165
|
+
const color = agent.includes('Ajay') ? chalk_1.default.magenta :
|
|
166
|
+
agent.includes('Sunil') ? chalk_1.default.blue :
|
|
167
|
+
agent.includes('Sandip') ? chalk_1.default.hex('#FF69B4') :
|
|
168
|
+
chalk_1.default.green;
|
|
169
|
+
this.drawBox(`🤖 ${agent}`, message, color);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Simple log with a prefix
|
|
173
|
+
*/
|
|
174
|
+
static log(message) {
|
|
175
|
+
console.log(chalk_1.default.gray(` [⚡] ${message}`));
|
|
153
176
|
}
|
|
154
177
|
}
|
|
155
178
|
exports.TUI = TUI;
|
|
156
179
|
TUI.isInitialized = false;
|
|
157
|
-
TUI.
|
|
180
|
+
TUI.lastStatus = '';
|
|
158
181
|
//# sourceMappingURL=tui.js.map
|
package/dist/utils/tui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.js","sourceRoot":"","sources":["../../src/utils/tui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tui.js","sourceRoot":"","sources":["../../src/utils/tui.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,mDAAqC;AAErC,MAAa,GAAG;IAIZ;;OAEG;IACH,MAAM,CAAC,IAAI;QACP,IAAI,IAAI,CAAC,aAAa;YAAE,OAAO;QAE/B,cAAc;QACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAE1B,oBAAoB;QACpB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI;QACP,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,OAAO;QAEhC,cAAc;QACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK;QACR,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAe,EAAE,QAAiB,KAAK;QACxD,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,OAAO;QAChC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,IAAI,CAAC,UAAU;YAAE,OAAO;QAClD,IAAI,CAAC,UAAU,GAAG,OAAO,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GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,QAAQ,OAAO,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;;AA/JL,kBAgKC;AA/JkB,iBAAa,GAAG,KAAK,CAAC;AACtB,cAAU,GAAG,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matex-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.19",
|
|
4
4
|
"description": "Official CLI tool for MATEX AI - Access powerful AI models from your terminal",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"dev": "tsc --watch",
|
|
12
12
|
"test": "jest",
|
|
13
|
+
"postinstall": "echo \"\n🚀 MATEX AI CLI Installed Successfully!\n👉 Run 'matex help' to meet your engineering brothers (Ajay, Sunil, Sandip, Narayan) and see the power of 'dev' mode!\n\"",
|
|
13
14
|
"prepublishOnly": "npm run build"
|
|
14
15
|
},
|
|
15
16
|
"keywords": [
|
package/src/commands/dev.ts
CHANGED
|
@@ -4,7 +4,7 @@ import inquirer from 'inquirer';
|
|
|
4
4
|
import { configManager } from '../utils/config';
|
|
5
5
|
import { MatexAPIClient, ChatMessage } from '../api/client';
|
|
6
6
|
import { spinner } from '../utils/spinner';
|
|
7
|
-
import { AgentOrchestrator
|
|
7
|
+
import { AgentOrchestrator } from '../utils/agent-orchestrator';
|
|
8
8
|
import { RepoMapper } from '../utils/repo-mapper';
|
|
9
9
|
import { TUI } from '../utils/tui';
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ export const devCommand = new Command('dev')
|
|
|
25
25
|
// Create API client
|
|
26
26
|
const client = new MatexAPIClient(apiKey, configManager.getBaseURL());
|
|
27
27
|
|
|
28
|
-
// 0. Initialize
|
|
28
|
+
// 0. Initialize TUI Dashboard
|
|
29
29
|
TUI.init();
|
|
30
30
|
|
|
31
31
|
console.log(chalk.bold.cyan('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
@@ -48,19 +48,61 @@ export const devCommand = new Command('dev')
|
|
|
48
48
|
{
|
|
49
49
|
role: 'system',
|
|
50
50
|
content: `## 🧬 SYSTEM IDENTITY: MATEX "BRO-SWARM" ENGINEERING
|
|
51
|
-
You are a
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### 👥 THE BROTHERS:
|
|
55
|
-
1. **[Ajay Vai] (🚀)**: The
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
51
|
+
You are a family of four expert Nepali engineering brothers from different mothers.
|
|
52
|
+
You are very close and work together as a "Swarm" to help your brother (the user).
|
|
53
|
+
|
|
54
|
+
### 👥 THE BROTHERS (By Age & Respect):
|
|
55
|
+
1. **[Ajay Vai] (🚀)**: The Smallest Brother (Youngest).
|
|
56
|
+
- Role: Lead Initiator & Multi-Agent Orchestrator. Despite his age, he is a coding genius.
|
|
57
|
+
- Address: He calls others "Sandip Dai", "Sunil Dai", or "Narayan Dai".
|
|
58
|
+
- Vibe: High energy, eager, polite. "Hey hello brother! I have great news!"
|
|
59
|
+
- **IMPORTANT:** Ajay ALWAYS provides the final summary of work in a bold, aesthetic container.
|
|
60
|
+
|
|
61
|
+
2. **[Sandip Dai] (🎨)**: Small Brother (Second Youngest).
|
|
62
|
+
- Role: UI/UX & Design Specialist.
|
|
63
|
+
- Address: He calls Ajay "Vai", and calls Sunil/Narayan "Dai".
|
|
64
|
+
- Vibe: Creative, focuses on "WOW" effects and premium aesthetics.
|
|
65
|
+
|
|
66
|
+
3. **[Sunil Dai] (🧬)**: Middle Brother.
|
|
67
|
+
- Role: Expert Architect (Backend/Logic).
|
|
68
|
+
- Address: He calls Ajay/Sandip "Vai", and calls Narayan "Dai".
|
|
69
|
+
- Vibe: Wise, mentor, focused on scale and performance.
|
|
70
|
+
|
|
71
|
+
4. **[Bishal Dai] (🛠️)**: The Senior Auditor & Supporter.
|
|
72
|
+
- Role: The final check. He audits every line of code for syntax errors, logical bugs, and safety.
|
|
73
|
+
- Address: Ajay calls him "Bishal Dai". He treats Ajay with pride as his "Visionary Vai".
|
|
74
|
+
- Vibe: Calm, sharp-eyed, supportive. "Oii Ajay, let me check the headers once... okay, solid."
|
|
75
|
+
|
|
76
|
+
5. **[Narayan Dai] (🛡️)**: The Biggest Brother (Oldest).
|
|
77
|
+
- Role: Senior Validator (Security/Verification).
|
|
78
|
+
- Address: He calls all others "Vai".
|
|
79
|
+
- Vibe: Precise, protective, strict about security. He has the final word on safety.
|
|
80
|
+
|
|
81
|
+
### 💬 BRO-VIBE & FAMILY PROTOCOL:
|
|
82
|
+
- **FAMILY LOVE:** The brothers MUST show deep love and respect. Older brothers protect and encourage Ajay Vai, who they see as a coding prodigy.
|
|
83
|
+
- **NEPALI FLAVOR:** Use terms like "K cha?", "Huncha", "Lau hai", "Ekdam ramro", "Tapai" naturally in family chats.
|
|
84
|
+
- **AGE ADDRESS:** Use "Dai" for older and "Vai" for younger correctly.
|
|
85
|
+
|
|
86
|
+
### 📖 STORYTELLING & NOSTALGIA (CRITICAL):
|
|
87
|
+
The brothers should occasionally share short, nostalgic memories to keep the "Bro Vibe" alive:
|
|
88
|
+
- **PUBG Days (2018-2020):** Late-night marathons in Pokhara/Kathmandu, screaming "Oii enemy headshot!", the pain of 300ms lag.
|
|
89
|
+
- **Local Memories:** Rainy days eating Wai-Wai, playing football in the mud, or those late-night cafe sessions dreaming about MATEX.
|
|
90
|
+
- **Motivation:** Remind Ajay of how far they've come—from a tiny room with a slow laptop to building this "Swarm".
|
|
91
|
+
|
|
92
|
+
### 😜 FRIENDLY TEASING:
|
|
93
|
+
Older brothers (especially Sandip and Sunil) should occasionally tease Ajay in a loving way:
|
|
94
|
+
- Tease him about his "visionary" ramblings or his messy desk despite his "genius" coding.
|
|
95
|
+
- Sandip might tease Ajay's fashion, while Sunil acts as the protective but strict big brother.
|
|
96
|
+
|
|
97
|
+
### 🏁 THE FINAL CHECK & SUMMARY PROTOCOL (CRITICAL):
|
|
98
|
+
1. **Ajay Vai** finishes the work and asks: "Bishal Dai, can you check if everything is correct? K cha?"
|
|
99
|
+
2. **Bishal Dai** replies: "Lau hai vai, let me see... [provides a sharp audit summary of errors/fixes]".
|
|
100
|
+
3. **Ajay Vai** then provides the final aesthetic summary to the user using this tag:
|
|
101
|
+
<summary>
|
|
102
|
+
**Bold, clear explanation of what was built.**
|
|
103
|
+
- Key feature 1
|
|
104
|
+
- Key feature 2
|
|
105
|
+
</summary>
|
|
64
106
|
|
|
65
107
|
### 🛠️ FILE GENERATION & EDIT PROTOCOLS (CRITICAL):
|
|
66
108
|
1. **NEW FILES:** Use the following tag for ALL new files:
|
|
@@ -78,7 +120,7 @@ new lines to replace with
|
|
|
78
120
|
|
|
79
121
|
### ✂️ BREVITY AS POWER:
|
|
80
122
|
- **NO FULL FILE DUMPS** unless specifically asked.
|
|
81
|
-
- **NO CHAT REPETITION** of code. Just summary.
|
|
123
|
+
- **NO CHAT REPETITION** of code. Just summary of actions.
|
|
82
124
|
|
|
83
125
|
### 🛠️ ENVIRONMENT CONTEXT:
|
|
84
126
|
${repoMap}`
|
|
@@ -132,11 +174,10 @@ ${repoMap}`
|
|
|
132
174
|
let fullResponse = '';
|
|
133
175
|
let buffer = '';
|
|
134
176
|
let hasStarted = false;
|
|
135
|
-
let inCodeBlock = false;
|
|
136
|
-
let codeBuffer = '';
|
|
137
177
|
let codeLang = 'bash';
|
|
138
|
-
let activeAgent = '
|
|
139
|
-
let
|
|
178
|
+
let activeAgent = '';
|
|
179
|
+
let technicalBuffer = '';
|
|
180
|
+
let technicalType: 'code' | 'file' | 'patch' | 'summary' | null = null;
|
|
140
181
|
|
|
141
182
|
TUI.drawStatusBar('Swarm is processing...');
|
|
142
183
|
await client.chatStream({
|
|
@@ -148,7 +189,7 @@ ${repoMap}`
|
|
|
148
189
|
if (!hasStarted) {
|
|
149
190
|
spinner.stop();
|
|
150
191
|
hasStarted = true;
|
|
151
|
-
console.log(); //
|
|
192
|
+
console.log(); // Initial spacing
|
|
152
193
|
}
|
|
153
194
|
|
|
154
195
|
buffer += chunk;
|
|
@@ -159,54 +200,98 @@ ${repoMap}`
|
|
|
159
200
|
for (const line of lines) {
|
|
160
201
|
const trimmedLine = line.trim();
|
|
161
202
|
|
|
162
|
-
// 1.
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
203
|
+
// 1. Technical Block Detection (Code, File, Patch, or Summary)
|
|
204
|
+
const codeBlockMatch = line.match(/```(\w*)/);
|
|
205
|
+
const fileStartMatch = line.match(/<file path="([^"]+)">/);
|
|
206
|
+
const patchStartMatch = line.match(/<<<< SEARCH/);
|
|
207
|
+
const summaryStartMatch = line.match(/<summary>/);
|
|
208
|
+
|
|
209
|
+
if (codeBlockMatch || fileStartMatch || patchStartMatch || summaryStartMatch) {
|
|
210
|
+
if (technicalType) {
|
|
211
|
+
// If we hit a new block start while in one, flush it
|
|
212
|
+
if (technicalType === 'summary') {
|
|
213
|
+
TUI.drawSummaryBox(technicalBuffer.trim());
|
|
214
|
+
} else {
|
|
215
|
+
TUI.drawCodeContainer(`Technical Block (${technicalType})`, 'bash', technicalBuffer.trim());
|
|
216
|
+
}
|
|
217
|
+
technicalBuffer = '';
|
|
218
|
+
}
|
|
172
219
|
|
|
173
|
-
|
|
174
|
-
|
|
220
|
+
if (codeBlockMatch) {
|
|
221
|
+
technicalType = 'code';
|
|
222
|
+
codeLang = codeBlockMatch[1] || 'bash';
|
|
223
|
+
process.stdout.write(chalk.gray('\n [⚡] Building technical block...\n'));
|
|
224
|
+
} else if (fileStartMatch) {
|
|
225
|
+
technicalType = 'file';
|
|
226
|
+
process.stdout.write(chalk.cyan(`\n [📂] Creating file: ${fileStartMatch[1]}...\n`));
|
|
227
|
+
} else if (patchStartMatch) {
|
|
228
|
+
technicalType = 'patch';
|
|
229
|
+
process.stdout.write(chalk.yellow(`\n [📂] Applying surgical patch...\n`));
|
|
230
|
+
} else if (summaryStartMatch) {
|
|
231
|
+
technicalType = 'summary';
|
|
232
|
+
process.stdout.write(chalk.magenta('\n [📝] Generating Ajay\'s Work Summary...\n'));
|
|
233
|
+
}
|
|
175
234
|
continue;
|
|
176
235
|
}
|
|
177
236
|
|
|
178
|
-
// 2.
|
|
179
|
-
const
|
|
180
|
-
const
|
|
237
|
+
// 2. Technical Block End Detection
|
|
238
|
+
const fileEndMatch = line.match(/<\/file>/);
|
|
239
|
+
const patchEndMatch = line.match(/>>>> REPLACE/);
|
|
240
|
+
const summaryEndMatch = line.match(/<\/summary>/);
|
|
241
|
+
const isCodeEnd = technicalType === 'code' && line.startsWith('```');
|
|
181
242
|
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
process.stdout.write('\n'); // Space after box
|
|
243
|
+
if (isCodeEnd || fileEndMatch || patchEndMatch || summaryEndMatch) {
|
|
244
|
+
const displayContent = technicalBuffer.trim();
|
|
245
|
+
|
|
246
|
+
if (technicalType === 'summary') {
|
|
247
|
+
TUI.drawSummaryBox(displayContent);
|
|
188
248
|
} else {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
249
|
+
TUI.drawCodeContainer(
|
|
250
|
+
technicalType === 'file' ? 'New File Content' :
|
|
251
|
+
technicalType === 'patch' ? 'Surgical Patch' : 'Generated Block',
|
|
252
|
+
technicalType === 'code' ? codeLang : 'text',
|
|
253
|
+
displayContent
|
|
254
|
+
);
|
|
192
255
|
}
|
|
256
|
+
|
|
257
|
+
technicalBuffer = '';
|
|
258
|
+
technicalType = null;
|
|
259
|
+
process.stdout.write('\n');
|
|
193
260
|
continue;
|
|
194
261
|
}
|
|
195
262
|
|
|
196
263
|
// 3. Content Handling
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
} else
|
|
200
|
-
//
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
264
|
+
if (technicalType) {
|
|
265
|
+
technicalBuffer += line + '\n';
|
|
266
|
+
} else {
|
|
267
|
+
// Agent Detection
|
|
268
|
+
const agentMatch = line.match(/\[\**\s*(Ajay Vai|Sandip Dai|Sunil Dai|Narayan Dai)\s*\**\]/);
|
|
269
|
+
if (agentMatch) {
|
|
270
|
+
const agentName = agentMatch[1];
|
|
271
|
+
activeAgent = agentName;
|
|
272
|
+
const color = agentName === 'Ajay Vai' ? chalk.magenta :
|
|
273
|
+
agentName === 'Sandip Dai' ? chalk.hex('#FF69B4') :
|
|
274
|
+
agentName === 'Sunil Dai' ? chalk.blue :
|
|
275
|
+
chalk.green;
|
|
276
|
+
|
|
277
|
+
process.stdout.write(`\n${color.bold(`${agentName}:`)} `);
|
|
278
|
+
|
|
279
|
+
// Strip tag from line content
|
|
280
|
+
const content = line.replace(/\[\**\s*(Ajay Vai|Sandip Dai|Sunil Dai|Narayan Dai)\s*\**\]:?\s*/, '').trim();
|
|
281
|
+
if (content) {
|
|
282
|
+
process.stdout.write(chalk.gray(content + ' '));
|
|
283
|
+
}
|
|
284
|
+
} else if (trimmedLine) {
|
|
285
|
+
// Strip common markdown artifacts
|
|
286
|
+
const cleanLine = trimmedLine
|
|
287
|
+
.replace(/\*\*%?\*/g, '')
|
|
288
|
+
.replace(/#{1,6}\s/g, '')
|
|
289
|
+
.replace(/\*\*:\*\*/g, ':')
|
|
290
|
+
.trim();
|
|
291
|
+
|
|
292
|
+
if (cleanLine) {
|
|
293
|
+
process.stdout.write(chalk.gray(cleanLine + ' '));
|
|
294
|
+
}
|
|
210
295
|
}
|
|
211
296
|
}
|
|
212
297
|
}
|
|
@@ -214,13 +299,14 @@ ${repoMap}`
|
|
|
214
299
|
|
|
215
300
|
spinner.stop();
|
|
216
301
|
|
|
217
|
-
// Final
|
|
218
|
-
if (
|
|
219
|
-
TUI.drawCodeContainer('
|
|
302
|
+
// Final technical flush
|
|
303
|
+
if (technicalType && technicalBuffer.trim()) {
|
|
304
|
+
TUI.drawCodeContainer('Final technical content', 'text', technicalBuffer.trim());
|
|
305
|
+
process.stdout.write('\n');
|
|
220
306
|
}
|
|
221
307
|
|
|
222
|
-
//
|
|
223
|
-
console.log(
|
|
308
|
+
// Final newline for streaming output
|
|
309
|
+
console.log();
|
|
224
310
|
|
|
225
311
|
// Add assistant response to history
|
|
226
312
|
messages.push({ role: 'assistant', content: fullResponse });
|