multi-agents-cli 1.1.6 → 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/reset.js +7 -12
- package/package.json +1 -1
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