imhcode 2.0.2 → 2.0.4
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/bin/imhcode.js +12 -6
- package/package.json +1 -1
package/bin/imhcode.js
CHANGED
|
@@ -108,7 +108,13 @@ if (command === 'plan') {
|
|
|
108
108
|
process.exit(1);
|
|
109
109
|
});
|
|
110
110
|
} else if (command === 'gui') {
|
|
111
|
-
|
|
111
|
+
console.log('💡 Note: \'imhcode gui\' is deprecated in favor of the interactive TUI.');
|
|
112
|
+
runTuiCommand().catch(err => {
|
|
113
|
+
console.error(err.message ?? err);
|
|
114
|
+
process.exit(1);
|
|
115
|
+
});
|
|
116
|
+
} else if (command === 'init') {
|
|
117
|
+
runInit().catch(err => {
|
|
112
118
|
console.error(err.message ?? err);
|
|
113
119
|
process.exit(1);
|
|
114
120
|
});
|
|
@@ -124,8 +130,8 @@ if (command === 'plan') {
|
|
|
124
130
|
process.exit(1);
|
|
125
131
|
});
|
|
126
132
|
} else {
|
|
127
|
-
// Default:
|
|
128
|
-
|
|
133
|
+
// Default: start interactive TUI
|
|
134
|
+
runTuiCommand().catch(err => {
|
|
129
135
|
console.error(err.message ?? err);
|
|
130
136
|
process.exit(1);
|
|
131
137
|
});
|
|
@@ -3164,14 +3170,14 @@ async function runTuiCommand() {
|
|
|
3164
3170
|
const infoLeft = ` Project: ${projectName}`;
|
|
3165
3171
|
const infoRight = `Path: ${cwd.length > 35 ? '...' + cwd.slice(-32) : cwd} `;
|
|
3166
3172
|
const paddingInfo = width - 4 - infoLeft.length - infoRight.length;
|
|
3167
|
-
console.log(ANSI.cyan + ` │` + ANSI.reset + ANSI.bold + infoLeft + ' '.repeat(paddingInfo) + ANSI.dim + infoRight + ANSI.cyan + `│` + ANSI.reset);
|
|
3173
|
+
console.log(ANSI.cyan + ` │` + ANSI.reset + ANSI.bold + infoLeft + ' '.repeat(Math.max(0, paddingInfo)) + ANSI.dim + infoRight + ANSI.cyan + `│` + ANSI.reset);
|
|
3168
3174
|
|
|
3169
3175
|
const statusLine = ` Status: ${statusStr}`;
|
|
3170
3176
|
const engineLine = `Engine: ${engineStr} `;
|
|
3171
3177
|
const statusClean = statusLine.replace(/\x1b\[[0-9;]*m/g, '');
|
|
3172
3178
|
const engineClean = engineLine.replace(/\x1b\[[0-9;]*m/g, '');
|
|
3173
3179
|
const paddingStatus = width - 4 - statusClean.length - engineClean.length;
|
|
3174
|
-
console.log(ANSI.cyan + ` │` + ANSI.reset + statusLine + ' '.repeat(paddingStatus) + ANSI.dim + engineLine + ANSI.cyan + `│` + ANSI.reset);
|
|
3180
|
+
console.log(ANSI.cyan + ` │` + ANSI.reset + statusLine + ' '.repeat(Math.max(0, paddingStatus)) + ANSI.dim + engineLine + ANSI.cyan + `│` + ANSI.reset);
|
|
3175
3181
|
|
|
3176
3182
|
console.log(ANSI.cyan + ` ├${'─'.repeat(width - 4)}┤` + ANSI.reset);
|
|
3177
3183
|
|
|
@@ -3219,7 +3225,7 @@ async function runTuiCommand() {
|
|
|
3219
3225
|
function centerText(text, width) {
|
|
3220
3226
|
const cleanText = text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
3221
3227
|
const padding = Math.max(0, Math.floor((width - cleanText.length) / 2));
|
|
3222
|
-
return ' '.repeat(padding) + text + ' '.repeat(width - cleanText.length - padding);
|
|
3228
|
+
return ' '.repeat(padding) + text + ' '.repeat(Math.max(0, width - cleanText.length - padding));
|
|
3223
3229
|
}
|
|
3224
3230
|
|
|
3225
3231
|
// Set up standard input listener
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imhcode",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "IMH-Code — Imam Hussain Coding Harness Platform. A fast-first multi-agent AI coding framework with intelligent model routing. 19 generic role-based agents (planner, nextjs-executor, laravel-executor, etc.), configurable testing strategy, and 7 token-saving optimizations for rapid MVP development.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|