@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.
- package/dist/commands/add-repo.d.ts.map +1 -1
- package/dist/commands/add-repo.js +24 -14
- package/dist/commands/add-repo.js.map +1 -1
- package/dist/commands/commit.js +1 -1
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/diff.js +1 -1
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/handoff.js +1 -1
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/logs.js +1 -1
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +12 -7
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/pack.js +1 -1
- package/dist/commands/pack.js.map +1 -1
- package/dist/commands/refresh.js +13 -8
- package/dist/commands/refresh.js.map +1 -1
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +12 -7
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stop.js +1 -1
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/sync.js +13 -8
- package/dist/commands/sync.js.map +1 -1
- package/dist/core/workspace.d.ts +7 -0
- package/dist/core/workspace.d.ts.map +1 -1
- package/dist/core/workspace.js +45 -1
- package/dist/core/workspace.js.map +1 -1
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +14 -0
- package/dist/generators/index.js.map +1 -1
- package/dist/gui/assets/index-CFWwqFux.js +23 -0
- package/dist/gui/assets/index-Dvc9QMvl.css +2 -0
- package/dist/gui/index.html +2 -2
- package/dist/orchestration/runner.d.ts +5 -6
- package/dist/orchestration/runner.d.ts.map +1 -1
- package/dist/orchestration/runner.js +105 -102
- package/dist/orchestration/runner.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +53 -1
- package/dist/server.js.map +1 -1
- package/dist/utils/detect-editors.js +1 -1
- package/dist/utils/detect-editors.js.map +1 -1
- package/dist/utils/detect-editors.test.js +3 -3
- package/dist/utils/detect-editors.test.js.map +1 -1
- package/dist/utils/prompts.d.ts +1 -0
- package/dist/utils/prompts.d.ts.map +1 -1
- package/dist/utils/prompts.js +77 -15
- package/dist/utils/prompts.js.map +1 -1
- package/extension/package.json +9 -0
- package/extension/src/extension.ts +37 -1
- package/gui/eslint.config.js +4 -0
- package/gui/src/App.tsx +375 -151
- package/gui/src/features/changes/ChangesViewer.tsx +246 -70
- package/gui/src/features/services/ServiceConsole.tsx +162 -71
- package/gui/src/features/workspace/WorkspaceList.tsx +184 -32
- package/gui/src/index.css +95 -2
- package/package.json +2 -1
- package/src/commands/add-repo.ts +30 -14
- package/src/commands/commit.ts +1 -1
- package/src/commands/diff.ts +1 -1
- package/src/commands/doctor.ts +1 -1
- package/src/commands/handoff.ts +1 -1
- package/src/commands/logs.ts +1 -1
- package/src/commands/open.ts +15 -7
- package/src/commands/pack.ts +1 -1
- package/src/commands/refresh.ts +16 -8
- package/src/commands/remove.ts +15 -7
- package/src/commands/start.ts +1 -1
- package/src/commands/status.ts +1 -1
- package/src/commands/stop.ts +1 -1
- package/src/commands/sync.ts +16 -8
- package/src/core/workspace.ts +48 -1
- package/src/generators/index.ts +20 -0
- package/src/orchestration/runner.ts +112 -108
- package/src/server.ts +58 -1
- package/src/utils/detect-editors.test.ts +3 -3
- package/src/utils/detect-editors.ts +1 -1
- package/src/utils/prompts.ts +88 -14
- package/dist/gui/assets/index-Ca2VRMrQ.js +0 -22
- 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: '
|
|
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('
|
|
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: '
|
|
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: '
|
|
15
|
+
{ name: 'Antigravity', command: 'antigravity' },
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
/**
|
package/src/utils/prompts.ts
CHANGED
|
@@ -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
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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) =>
|
|
153
|
+
return repos.filter((r) => selectedPaths.has(r.path));
|
|
80
154
|
}
|
|
81
155
|
|
|
82
156
|
/**
|