multi-agents-cli 1.0.32 → 1.0.33
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/init.js +27 -13
- package/package.json +1 -1
package/init.js
CHANGED
|
@@ -695,14 +695,22 @@ const main = async () => {
|
|
|
695
695
|
});
|
|
696
696
|
console.log(` ${dim(`${active.length + 1}.`)} ${dim('Back')}\n`);
|
|
697
697
|
|
|
698
|
-
const
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
698
|
+
const pickRes = await prompts({
|
|
699
|
+
type: 'select',
|
|
700
|
+
name: 'value',
|
|
701
|
+
message: 'Which process do you want to restart?',
|
|
702
|
+
choices: [
|
|
703
|
+
...active.map(({ scope, agent, data }) => ({
|
|
704
|
+
title: `${agent} (${scope}) - ${data.status || 'ACTIVE'}`,
|
|
705
|
+
value: agent,
|
|
706
|
+
})),
|
|
707
|
+
{ title: 'Back', value: '__back__' },
|
|
708
|
+
],
|
|
709
|
+
}, { onCancel: () => process.exit(0) });
|
|
710
|
+
|
|
711
|
+
if (!pickRes.value || pickRes.value === '__back__') return false;
|
|
712
|
+
const idx = active.findIndex(a => a.agent === pickRes.value);
|
|
713
|
+
if (idx < 0) return false;
|
|
706
714
|
const { scope, agent, data } = active[idx];
|
|
707
715
|
const deps = (DEPENDENCIES[scope] || {})[agent] || [];
|
|
708
716
|
const affectedAgents = [{ scope, agent, data }];
|
|
@@ -734,11 +742,17 @@ const main = async () => {
|
|
|
734
742
|
|
|
735
743
|
console.log(`\n ${red('This cannot be undone.')}\n`);
|
|
736
744
|
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
745
|
+
const confirmRes = await prompts({
|
|
746
|
+
type: 'select',
|
|
747
|
+
name: 'value',
|
|
748
|
+
message: 'This cannot be undone. Continue?',
|
|
749
|
+
choices: [
|
|
750
|
+
{ title: 'Yes - wipe and restart', value: 'y' },
|
|
751
|
+
{ title: 'Cancel', value: 'n' },
|
|
752
|
+
],
|
|
753
|
+
}, { onCancel: () => process.exit(0) });
|
|
754
|
+
|
|
755
|
+
if (confirmRes.value !== 'y') {
|
|
742
756
|
console.log(dim('\n Cancelled.\n'));
|
|
743
757
|
return false;
|
|
744
758
|
}
|
package/package.json
CHANGED