multi-agents-cli 1.1.5 → 1.1.7
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/core/workflow/agent.js +7 -0
- package/core/workflow/reset.js +7 -12
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -1497,6 +1497,13 @@ Mark each step complete. Only proceed to the task below when all are checked.
|
|
|
1497
1497
|
});
|
|
1498
1498
|
console.log(` ${green('✓')} Worktree created: worktrees/${worktreeName}`);
|
|
1499
1499
|
} catch (err) {
|
|
1500
|
+
const msg = err.stderr?.toString() || err.message || '';
|
|
1501
|
+
if (msg.includes('not a git repository')) {
|
|
1502
|
+
console.error(`
|
|
1503
|
+
${red('✖')} Not a git repository. Run git init first, then npm run init.
|
|
1504
|
+
`);
|
|
1505
|
+
process.exit(1);
|
|
1506
|
+
}
|
|
1500
1507
|
console.log(` ${yellow('!')} Worktree may already exist - continuing.`);
|
|
1501
1508
|
}
|
|
1502
1509
|
|
package/core/workflow/reset.js
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
|
|
18
18
|
const fs = require('fs');
|
|
19
19
|
const path = require('path');
|
|
20
|
-
const readline = require('readline');
|
|
21
20
|
const { execSync } = require('child_process');
|
|
22
21
|
|
|
23
22
|
let prompts = null;
|
|
@@ -130,8 +129,7 @@ const main = async () => {
|
|
|
130
129
|
|
|
131
130
|
// ── Step 1: First confirmation ────────────────────────────────────────────────
|
|
132
131
|
|
|
133
|
-
|
|
134
|
-
const ask = (q) => new Promise((resolve) => rl.question(q, (a) => resolve(a.trim())));
|
|
132
|
+
|
|
135
133
|
|
|
136
134
|
if (prompts && process.stdin.isTTY) {
|
|
137
135
|
const step1 = await prompts({
|
|
@@ -148,13 +146,6 @@ const main = async () => {
|
|
|
148
146
|
console.log(dim('\n Reset cancelled.\n'));
|
|
149
147
|
process.exit(0);
|
|
150
148
|
}
|
|
151
|
-
} else {
|
|
152
|
-
const ans = await ask(` ${bold('Are you sure?')} ${dim('(y/N)')}: `);
|
|
153
|
-
if (ans.toLowerCase() !== 'y') {
|
|
154
|
-
console.log(dim('\n Reset cancelled.\n'));
|
|
155
|
-
rl.close();
|
|
156
|
-
process.exit(0);
|
|
157
|
-
}
|
|
158
149
|
}
|
|
159
150
|
|
|
160
151
|
// ── Step 2: Type project name ─────────────────────────────────────────────────
|
|
@@ -163,8 +154,12 @@ const main = async () => {
|
|
|
163
154
|
console.log(` ${yellow('To confirm, type the project name exactly:')}`);
|
|
164
155
|
console.log(` ${cyan(bold(projectName))}\n`);
|
|
165
156
|
|
|
166
|
-
const
|
|
167
|
-
|
|
157
|
+
const step2 = await prompts({
|
|
158
|
+
type: 'text',
|
|
159
|
+
name: 'value',
|
|
160
|
+
message: 'Project name',
|
|
161
|
+
}, { onCancel: () => process.exit(0) });
|
|
162
|
+
const typed = (step2.value || '').trim();
|
|
168
163
|
|
|
169
164
|
if (typed !== projectName) {
|
|
170
165
|
console.log(`\n${red(' ✗ Project name does not match. Reset cancelled.')}\n`);
|
package/package.json
CHANGED