@mrpatronz/nexusflow 0.2.12 โ†’ 0.2.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.
Files changed (88) hide show
  1. package/dist/commands/add-repo.d.ts.map +1 -1
  2. package/dist/commands/add-repo.js +24 -14
  3. package/dist/commands/add-repo.js.map +1 -1
  4. package/dist/commands/commit.js +1 -1
  5. package/dist/commands/commit.js.map +1 -1
  6. package/dist/commands/diff.js +1 -1
  7. package/dist/commands/diff.js.map +1 -1
  8. package/dist/commands/doctor.js +1 -1
  9. package/dist/commands/doctor.js.map +1 -1
  10. package/dist/commands/handoff.js +1 -1
  11. package/dist/commands/handoff.js.map +1 -1
  12. package/dist/commands/logs.js +1 -1
  13. package/dist/commands/logs.js.map +1 -1
  14. package/dist/commands/open.d.ts.map +1 -1
  15. package/dist/commands/open.js +12 -7
  16. package/dist/commands/open.js.map +1 -1
  17. package/dist/commands/pack.js +1 -1
  18. package/dist/commands/pack.js.map +1 -1
  19. package/dist/commands/refresh.js +13 -8
  20. package/dist/commands/refresh.js.map +1 -1
  21. package/dist/commands/remove.d.ts.map +1 -1
  22. package/dist/commands/remove.js +12 -7
  23. package/dist/commands/remove.js.map +1 -1
  24. package/dist/commands/start.js +1 -1
  25. package/dist/commands/start.js.map +1 -1
  26. package/dist/commands/status.js +1 -1
  27. package/dist/commands/status.js.map +1 -1
  28. package/dist/commands/stop.js +1 -1
  29. package/dist/commands/stop.js.map +1 -1
  30. package/dist/commands/sync.js +13 -8
  31. package/dist/commands/sync.js.map +1 -1
  32. package/dist/core/workspace.d.ts +7 -0
  33. package/dist/core/workspace.d.ts.map +1 -1
  34. package/dist/core/workspace.js +45 -1
  35. package/dist/core/workspace.js.map +1 -1
  36. package/dist/generators/index.d.ts.map +1 -1
  37. package/dist/generators/index.js +14 -0
  38. package/dist/generators/index.js.map +1 -1
  39. package/dist/gui/assets/index-CFWwqFux.js +23 -0
  40. package/dist/gui/assets/index-Dvc9QMvl.css +2 -0
  41. package/dist/gui/index.html +2 -2
  42. package/dist/orchestration/runner.d.ts +5 -6
  43. package/dist/orchestration/runner.d.ts.map +1 -1
  44. package/dist/orchestration/runner.js +105 -102
  45. package/dist/orchestration/runner.js.map +1 -1
  46. package/dist/server.d.ts.map +1 -1
  47. package/dist/server.js +53 -1
  48. package/dist/server.js.map +1 -1
  49. package/dist/utils/detect-editors.js +1 -1
  50. package/dist/utils/detect-editors.js.map +1 -1
  51. package/dist/utils/detect-editors.test.js +3 -3
  52. package/dist/utils/detect-editors.test.js.map +1 -1
  53. package/dist/utils/prompts.d.ts +1 -0
  54. package/dist/utils/prompts.d.ts.map +1 -1
  55. package/dist/utils/prompts.js +77 -15
  56. package/dist/utils/prompts.js.map +1 -1
  57. package/extension/package.json +9 -0
  58. package/extension/src/extension.ts +37 -1
  59. package/gui/eslint.config.js +4 -0
  60. package/gui/src/App.tsx +375 -151
  61. package/gui/src/features/changes/ChangesViewer.tsx +246 -70
  62. package/gui/src/features/services/ServiceConsole.tsx +162 -71
  63. package/gui/src/features/workspace/WorkspaceList.tsx +184 -32
  64. package/gui/src/index.css +95 -2
  65. package/package.json +2 -1
  66. package/src/commands/add-repo.ts +30 -14
  67. package/src/commands/commit.ts +1 -1
  68. package/src/commands/diff.ts +1 -1
  69. package/src/commands/doctor.ts +1 -1
  70. package/src/commands/handoff.ts +1 -1
  71. package/src/commands/logs.ts +1 -1
  72. package/src/commands/open.ts +15 -7
  73. package/src/commands/pack.ts +1 -1
  74. package/src/commands/refresh.ts +16 -8
  75. package/src/commands/remove.ts +15 -7
  76. package/src/commands/start.ts +1 -1
  77. package/src/commands/status.ts +1 -1
  78. package/src/commands/stop.ts +1 -1
  79. package/src/commands/sync.ts +16 -8
  80. package/src/core/workspace.ts +48 -1
  81. package/src/generators/index.ts +20 -0
  82. package/src/orchestration/runner.ts +112 -108
  83. package/src/server.ts +58 -1
  84. package/src/utils/detect-editors.test.ts +3 -3
  85. package/src/utils/detect-editors.ts +1 -1
  86. package/src/utils/prompts.ts +88 -14
  87. package/dist/gui/assets/index-Ca2VRMrQ.js +0 -22
  88. package/dist/gui/assets/index-fj0RJiOb.css +0 -2
@@ -23,14 +23,14 @@ describe('detectEditors', () => {
23
23
  { name: 'VS Code', command: 'code', detected: true },
24
24
  { name: 'VS Code Insiders', command: 'code-insiders', detected: false },
25
25
  { name: 'Cursor', command: 'cursor', detected: true },
26
- { name: 'Antigravity', command: 'agy', detected: false },
26
+ { name: 'Antigravity', command: 'antigravity', detected: false },
27
27
  ]);
28
28
 
29
29
  const isWin = process.platform === 'win32';
30
30
  expect(execa).toHaveBeenCalledWith('code', ['--version'], { reject: false, shell: isWin });
31
31
  expect(execa).toHaveBeenCalledWith('code-insiders', ['--version'], { reject: false, shell: isWin });
32
32
  expect(execa).toHaveBeenCalledWith('cursor', ['--version'], { reject: false, shell: isWin });
33
- expect(execa).toHaveBeenCalledWith('agy', ['--version'], { reject: false, shell: isWin });
33
+ expect(execa).toHaveBeenCalledWith('antigravity', ['--version'], { reject: false, shell: isWin });
34
34
  });
35
35
 
36
36
  it('should return detected = false for all editors if execa throws an error', async () => {
@@ -42,7 +42,7 @@ describe('detectEditors', () => {
42
42
  { name: 'VS Code', command: 'code', detected: false },
43
43
  { name: 'VS Code Insiders', command: 'code-insiders', detected: false },
44
44
  { name: 'Cursor', command: 'cursor', detected: false },
45
- { name: 'Antigravity', command: 'agy', detected: false },
45
+ { name: 'Antigravity', command: 'antigravity', detected: false },
46
46
  ]);
47
47
  });
48
48
  });
@@ -12,7 +12,7 @@ const EDITOR_CANDIDATES: ReadonlyArray<{ name: string; command: string }> = [
12
12
  { name: 'VS Code', command: 'code' },
13
13
  { name: 'VS Code Insiders', command: 'code-insiders' },
14
14
  { name: 'Cursor', command: 'cursor' },
15
- { name: 'Antigravity', command: 'agy' },
15
+ { name: 'Antigravity', command: 'antigravity' },
16
16
  ];
17
17
 
18
18
  /**
@@ -3,7 +3,7 @@
3
3
  * Interactive CLI prompts for NexusFlow using @inquirer/prompts.
4
4
  */
5
5
 
6
- import { input, checkbox, confirm } from '@inquirer/prompts';
6
+ import { input, checkbox, confirm, select, search } from '@inquirer/prompts';
7
7
  import chalk from 'chalk';
8
8
 
9
9
  import type { AIAssistant, DetectedAI, DetectedEditor, RepoInfo } from '../types.js';
@@ -57,26 +57,100 @@ export async function promptDescription(): Promise<string> {
57
57
 
58
58
  /**
59
59
  * Prompts the user to select repos from a list of discovered repos.
60
+ * Supports searching/filtering by term, viewing all, and incremental selection.
60
61
  */
61
62
  export async function promptSelectRepos(repos: RepoInfo[]): Promise<RepoInfo[]> {
62
63
  if (repos.length === 0) {
63
64
  return [];
64
65
  }
65
66
 
66
- const selected = await checkbox({
67
- message: 'Select projects to include:',
68
- choices: repos.map((repo) => ({
69
- name: `${repo.name} ${chalk.dim(`(${repo.path})`)}`,
70
- value: repo.path,
71
- checked: false,
72
- })),
73
- validate: (items) => {
74
- if (items.length === 0) return 'Please select at least one project';
75
- return true;
76
- },
77
- });
67
+ const selectedPaths = new Set<string>();
68
+
69
+ // If there are only a few repos (e.g. <= 10), we can just show a checkbox prompt directly to save time
70
+ if (repos.length <= 10) {
71
+ const toggled = await checkbox({
72
+ message: 'Select repositories to include in workspace:',
73
+ choices: repos.map((repo) => ({
74
+ name: `${repo.name} ${chalk.dim(`(${repo.path})`)}`,
75
+ value: repo.path,
76
+ checked: false,
77
+ })),
78
+ });
79
+ return repos.filter((r) => toggled.includes(r.path));
80
+ }
81
+
82
+ // Otherwise, use a loop with the search prompt to make it extremely easy to filter and toggle selection
83
+ while (true) {
84
+ console.log(chalk.bold(`\n๐Ÿ“ Selected Repositories (${selectedPaths.size}/${repos.length}):`));
85
+ if (selectedPaths.size === 0) {
86
+ console.log(chalk.dim(' (None selected yet)'));
87
+ } else {
88
+ repos.forEach((r) => {
89
+ if (selectedPaths.has(r.path)) {
90
+ console.log(` ${chalk.green('โœ“')} ${r.name} ${chalk.dim(`(${r.path})`)}`);
91
+ }
92
+ });
93
+ }
94
+ console.log();
95
+
96
+ const result = await search({
97
+ message: 'Search and select repositories (type to filter, select to toggle, choose Done to finish):',
98
+ source: async (input) => {
99
+ const query = (input || '').toLowerCase();
100
+ const filtered = repos.filter(
101
+ (r) =>
102
+ r.name.toLowerCase().includes(query) ||
103
+ r.path.toLowerCase().includes(query)
104
+ );
105
+
106
+ const choices = [
107
+ {
108
+ name: chalk.green(`โœ… Done selecting (${selectedPaths.size} repo(s) selected)`),
109
+ value: 'done',
110
+ },
111
+ ];
112
+
113
+ if (selectedPaths.size > 0) {
114
+ choices.push({
115
+ name: chalk.yellow('๐Ÿงน Clear all selections'),
116
+ value: 'clear',
117
+ });
118
+ }
119
+
120
+ filtered.forEach((r) => {
121
+ const isSelected = selectedPaths.has(r.path);
122
+ choices.push({
123
+ name: `${isSelected ? chalk.green('โœ“') : ' '} ${r.name} ${chalk.dim(`(${r.path})`)}`,
124
+ value: r.path,
125
+ });
126
+ });
127
+
128
+ return choices;
129
+ },
130
+ });
131
+
132
+ if (result === 'done') {
133
+ if (selectedPaths.size === 0) {
134
+ console.log(chalk.red(' Please select at least one repository.'));
135
+ continue;
136
+ }
137
+ break;
138
+ }
139
+
140
+ if (result === 'clear') {
141
+ selectedPaths.clear();
142
+ continue;
143
+ }
144
+
145
+ // Toggle selected state
146
+ if (selectedPaths.has(result)) {
147
+ selectedPaths.delete(result);
148
+ } else {
149
+ selectedPaths.add(result);
150
+ }
151
+ }
78
152
 
79
- return repos.filter((r) => selected.includes(r.path));
153
+ return repos.filter((r) => selectedPaths.has(r.path));
80
154
  }
81
155
 
82
156
  /**