multi-agents-cli 1.1.12 → 1.1.13
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 +9 -7
- package/core/workflow/complete.js +10 -1
- package/lib/ui.js +9 -7
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -41,19 +41,21 @@ const arrowSelect = async (message, choices, rl) => {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
const arrowConfirm = async (message, rl) => {
|
|
44
|
+
const arrowConfirm = async (message, rl, initial = true) => {
|
|
45
45
|
if (prompts && process.stdin.isTTY) {
|
|
46
46
|
const res = await prompts({
|
|
47
|
-
type: '
|
|
47
|
+
type: 'select',
|
|
48
48
|
name: 'value',
|
|
49
49
|
message,
|
|
50
|
-
|
|
50
|
+
choices: [
|
|
51
|
+
{ title: 'Yes', value: true },
|
|
52
|
+
{ title: 'No', value: false },
|
|
53
|
+
],
|
|
54
|
+
initial: initial ? 0 : 1,
|
|
51
55
|
}, { onCancel: () => process.exit(0) });
|
|
52
|
-
return res.value ??
|
|
56
|
+
return res.value ?? initial;
|
|
53
57
|
}
|
|
54
|
-
return
|
|
55
|
-
rl.question(`${message} (y/n): `, ans => resolve(ans.toLowerCase() !== 'n'));
|
|
56
|
-
});
|
|
58
|
+
return initial;
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
// ── Colors ────────────────────────────────────────────────────────────────────
|
|
@@ -55,7 +55,16 @@ const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8'));
|
|
|
55
55
|
|
|
56
56
|
const arrowConfirm = async (message, initial = true) => {
|
|
57
57
|
if (prompts && process.stdin.isTTY) {
|
|
58
|
-
const res = await prompts({
|
|
58
|
+
const res = await prompts({
|
|
59
|
+
type: 'select',
|
|
60
|
+
name: 'value',
|
|
61
|
+
message,
|
|
62
|
+
choices: [
|
|
63
|
+
{ title: 'Yes', value: true },
|
|
64
|
+
{ title: 'No', value: false },
|
|
65
|
+
],
|
|
66
|
+
initial: initial ? 0 : 1,
|
|
67
|
+
}, { onCancel: () => process.exit(0) });
|
|
59
68
|
return res.value ?? initial;
|
|
60
69
|
}
|
|
61
70
|
return initial;
|
package/lib/ui.js
CHANGED
|
@@ -62,19 +62,21 @@ const arrowSelect = async (message, choices, showBack = false, backLabel = '←
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
const arrowConfirm = async (message) => {
|
|
65
|
+
const arrowConfirm = async (message, initial = true) => {
|
|
66
66
|
if (prompts && process.stdin.isTTY) {
|
|
67
67
|
const res = await prompts({
|
|
68
|
-
type: '
|
|
68
|
+
type: 'select',
|
|
69
69
|
name: 'value',
|
|
70
70
|
message,
|
|
71
|
-
|
|
71
|
+
choices: [
|
|
72
|
+
{ title: 'Yes', value: true },
|
|
73
|
+
{ title: 'No', value: false },
|
|
74
|
+
],
|
|
75
|
+
initial: initial ? 0 : 1,
|
|
72
76
|
}, { onCancel: () => process.exit(0) });
|
|
73
|
-
return res.value ??
|
|
77
|
+
return res.value ?? initial;
|
|
74
78
|
}
|
|
75
|
-
return
|
|
76
|
-
rl.question(`${message} (y/n): `, ans => resolve(ans.toLowerCase() !== 'n'));
|
|
77
|
-
});
|
|
79
|
+
return initial;
|
|
78
80
|
};
|
|
79
81
|
|
|
80
82
|
// ── Layout helpers ────────────────────────────────────────────────────────────
|
package/package.json
CHANGED