@mrpatronz/nexusflow 0.2.19 → 1.3.1

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 (294) hide show
  1. package/README.md +37 -7
  2. package/dist/analyzers/index.d.ts +23 -0
  3. package/dist/analyzers/index.d.ts.map +1 -1
  4. package/dist/analyzers/index.js +62 -0
  5. package/dist/analyzers/index.js.map +1 -1
  6. package/dist/commands/add-repo.d.ts +9 -0
  7. package/dist/commands/add-repo.d.ts.map +1 -1
  8. package/dist/commands/add-repo.js +12 -1
  9. package/dist/commands/add-repo.js.map +1 -1
  10. package/dist/commands/add-repo.test.d.ts +2 -0
  11. package/dist/commands/add-repo.test.d.ts.map +1 -0
  12. package/dist/commands/add-repo.test.js +30 -0
  13. package/dist/commands/add-repo.test.js.map +1 -0
  14. package/dist/commands/commands.test.js +26 -6
  15. package/dist/commands/commands.test.js.map +1 -1
  16. package/dist/commands/commit.d.ts +7 -1
  17. package/dist/commands/commit.d.ts.map +1 -1
  18. package/dist/commands/commit.js +31 -8
  19. package/dist/commands/commit.js.map +1 -1
  20. package/dist/commands/commit.test.d.ts +2 -0
  21. package/dist/commands/commit.test.d.ts.map +1 -0
  22. package/dist/commands/commit.test.js +54 -0
  23. package/dist/commands/commit.test.js.map +1 -0
  24. package/dist/commands/diff.d.ts +9 -2
  25. package/dist/commands/diff.d.ts.map +1 -1
  26. package/dist/commands/diff.js +36 -12
  27. package/dist/commands/diff.js.map +1 -1
  28. package/dist/commands/doctor.d.ts.map +1 -1
  29. package/dist/commands/doctor.js +16 -20
  30. package/dist/commands/doctor.js.map +1 -1
  31. package/dist/commands/handoff.d.ts.map +1 -1
  32. package/dist/commands/handoff.js +11 -15
  33. package/dist/commands/handoff.js.map +1 -1
  34. package/dist/commands/refresh.d.ts +4 -2
  35. package/dist/commands/refresh.d.ts.map +1 -1
  36. package/dist/commands/refresh.js +20 -36
  37. package/dist/commands/refresh.js.map +1 -1
  38. package/dist/commands/schedule.d.ts +35 -0
  39. package/dist/commands/schedule.d.ts.map +1 -0
  40. package/dist/commands/schedule.js +151 -0
  41. package/dist/commands/schedule.js.map +1 -0
  42. package/dist/commands/sync.d.ts.map +1 -1
  43. package/dist/commands/sync.js +28 -7
  44. package/dist/commands/sync.js.map +1 -1
  45. package/dist/commands/tui.js +1 -1
  46. package/dist/commands/tui.js.map +1 -1
  47. package/dist/commands/ui.d.ts +1 -0
  48. package/dist/commands/ui.d.ts.map +1 -1
  49. package/dist/commands/ui.js +5 -2
  50. package/dist/commands/ui.js.map +1 -1
  51. package/dist/core/adapters/local-storage.d.ts +7 -0
  52. package/dist/core/adapters/local-storage.d.ts.map +1 -1
  53. package/dist/core/adapters/local-storage.js +13 -4
  54. package/dist/core/adapters/local-storage.js.map +1 -1
  55. package/dist/core/adapters/storage.test.js +18 -0
  56. package/dist/core/adapters/storage.test.js.map +1 -1
  57. package/dist/core/analysis-cache.d.ts +58 -0
  58. package/dist/core/analysis-cache.d.ts.map +1 -0
  59. package/dist/core/analysis-cache.js +116 -0
  60. package/dist/core/analysis-cache.js.map +1 -0
  61. package/dist/core/analysis-cache.test.d.ts +2 -0
  62. package/dist/core/analysis-cache.test.d.ts.map +1 -0
  63. package/dist/core/analysis-cache.test.js +108 -0
  64. package/dist/core/analysis-cache.test.js.map +1 -0
  65. package/dist/core/refresh.d.ts +41 -0
  66. package/dist/core/refresh.d.ts.map +1 -0
  67. package/dist/core/refresh.js +56 -0
  68. package/dist/core/refresh.js.map +1 -0
  69. package/dist/core/scheduler.d.ts +117 -0
  70. package/dist/core/scheduler.d.ts.map +1 -0
  71. package/dist/core/scheduler.js +361 -0
  72. package/dist/core/scheduler.js.map +1 -0
  73. package/dist/core/scheduler.test.d.ts +2 -0
  74. package/dist/core/scheduler.test.d.ts.map +1 -0
  75. package/dist/core/scheduler.test.js +163 -0
  76. package/dist/core/scheduler.test.js.map +1 -0
  77. package/dist/core/sync.d.ts +6 -0
  78. package/dist/core/sync.d.ts.map +1 -1
  79. package/dist/core/sync.js +17 -12
  80. package/dist/core/sync.js.map +1 -1
  81. package/dist/core/workspace.d.ts +6 -0
  82. package/dist/core/workspace.d.ts.map +1 -1
  83. package/dist/core/workspace.js +32 -15
  84. package/dist/core/workspace.js.map +1 -1
  85. package/dist/core/workspace.test.d.ts +2 -0
  86. package/dist/core/workspace.test.d.ts.map +1 -0
  87. package/dist/core/workspace.test.js +42 -0
  88. package/dist/core/workspace.test.js.map +1 -0
  89. package/dist/generators/index.d.ts +7 -1
  90. package/dist/generators/index.d.ts.map +1 -1
  91. package/dist/generators/index.js +14 -1
  92. package/dist/generators/index.js.map +1 -1
  93. package/dist/generators/map-generator.d.ts.map +1 -1
  94. package/dist/generators/map-generator.js +4 -3
  95. package/dist/generators/map-generator.js.map +1 -1
  96. package/dist/generators/map-generator.test.js +4 -2
  97. package/dist/generators/map-generator.test.js.map +1 -1
  98. package/dist/gui/assets/index-ElroPpSP.js +26 -0
  99. package/dist/gui/index.html +1 -1
  100. package/dist/index.js +108 -4
  101. package/dist/index.js.map +1 -1
  102. package/dist/orchestration/index.d.ts +1 -1
  103. package/dist/orchestration/index.d.ts.map +1 -1
  104. package/dist/orchestration/index.js +1 -1
  105. package/dist/orchestration/index.js.map +1 -1
  106. package/dist/orchestration/runner.d.ts +16 -1
  107. package/dist/orchestration/runner.d.ts.map +1 -1
  108. package/dist/orchestration/runner.js +41 -5
  109. package/dist/orchestration/runner.js.map +1 -1
  110. package/dist/orchestration/runner.test.d.ts +2 -0
  111. package/dist/orchestration/runner.test.d.ts.map +1 -0
  112. package/dist/orchestration/runner.test.js +71 -0
  113. package/dist/orchestration/runner.test.js.map +1 -0
  114. package/dist/server.d.ts +17 -1
  115. package/dist/server.d.ts.map +1 -1
  116. package/dist/server.js +275 -114
  117. package/dist/server.js.map +1 -1
  118. package/dist/server.test.js +158 -1
  119. package/dist/server.test.js.map +1 -1
  120. package/dist/utils/multi-git.d.ts +21 -0
  121. package/dist/utils/multi-git.d.ts.map +1 -1
  122. package/dist/utils/multi-git.js +40 -4
  123. package/dist/utils/multi-git.js.map +1 -1
  124. package/dist/utils/prompts.d.ts.map +1 -1
  125. package/dist/utils/prompts.js +8 -2
  126. package/dist/utils/prompts.js.map +1 -1
  127. package/package.json +13 -1
  128. package/.agents/skills/ccc/SKILL.md +0 -71
  129. package/.agents/skills/ccc/references/management.md +0 -110
  130. package/.agents/skills/ccc/references/settings.md +0 -126
  131. package/.github/dependabot.yml +0 -52
  132. package/.github/workflows/ci.yml +0 -44
  133. package/.github/workflows/dependabot-merge.yml +0 -53
  134. package/.github/workflows/release-desktop.yml +0 -67
  135. package/.github/workflows/release-npm.yml +0 -65
  136. package/.github/workflows/release-vscode.yml +0 -61
  137. package/.vscode/launch.json +0 -17
  138. package/.vscode/tasks.json +0 -17
  139. package/GETTING_STARTED.md +0 -114
  140. package/desktop/build-installer.js +0 -228
  141. package/desktop/build.js +0 -118
  142. package/desktop/installer/nexusflow.iss +0 -35
  143. package/desktop/neutralino.config.json +0 -39
  144. package/desktop/package-lock.json +0 -1060
  145. package/desktop/package.json +0 -14
  146. package/dist/gui/assets/index-D8iJPvnk.js +0 -26
  147. package/extension/media/icon.svg +0 -1
  148. package/extension/package-lock.json +0 -6044
  149. package/extension/package.json +0 -117
  150. package/extension/src/extension.ts +0 -653
  151. package/extension/tsconfig.json +0 -21
  152. package/gui/README.md +0 -73
  153. package/gui/e2e/dashboard.spec.ts +0 -61
  154. package/gui/e2e/wizard.spec.ts +0 -346
  155. package/gui/eslint.config.js +0 -26
  156. package/gui/index.html +0 -17
  157. package/gui/package-lock.json +0 -3137
  158. package/gui/package.json +0 -37
  159. package/gui/playwright.config.ts +0 -41
  160. package/gui/public/app_logo.png +0 -0
  161. package/gui/public/favicon.svg +0 -1
  162. package/gui/public/icons.svg +0 -24
  163. package/gui/src/App.css +0 -1
  164. package/gui/src/App.tsx +0 -3573
  165. package/gui/src/app/AppSidebar.tsx +0 -69
  166. package/gui/src/assets/hero.png +0 -0
  167. package/gui/src/assets/react.svg +0 -1
  168. package/gui/src/assets/vite.svg +0 -1
  169. package/gui/src/components/AddRepoPicker.tsx +0 -81
  170. package/gui/src/components/ui/Button.tsx +0 -40
  171. package/gui/src/components/ui/Card.tsx +0 -6
  172. package/gui/src/components/ui/EmptyState.tsx +0 -22
  173. package/gui/src/components/ui/Input.tsx +0 -21
  174. package/gui/src/components/ui/Menu.tsx +0 -71
  175. package/gui/src/components/ui/Modal.tsx +0 -39
  176. package/gui/src/components/ui/PageHeader.tsx +0 -21
  177. package/gui/src/components/ui/RepoStatusStrip.tsx +0 -33
  178. package/gui/src/components/ui/Skeleton.tsx +0 -5
  179. package/gui/src/components/ui/StatusPill.tsx +0 -36
  180. package/gui/src/components/ui/Tabs.tsx +0 -40
  181. package/gui/src/components/ui/cn.ts +0 -4
  182. package/gui/src/components/ui/index.ts +0 -16
  183. package/gui/src/features/changes/ChangesViewer.tsx +0 -388
  184. package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
  185. package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
  186. package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
  187. package/gui/src/features/services/ServiceConsole.tsx +0 -215
  188. package/gui/src/features/sessions/SessionHistory.tsx +0 -195
  189. package/gui/src/index.css +0 -167
  190. package/gui/src/lib/status.ts +0 -24
  191. package/gui/src/main.tsx +0 -94
  192. package/gui/src/pages/DashboardPage.tsx +0 -129
  193. package/gui/src/pages/WorkspacesPage.tsx +0 -352
  194. package/gui/src/types.ts +0 -81
  195. package/gui/tsconfig.app.json +0 -25
  196. package/gui/tsconfig.json +0 -7
  197. package/gui/tsconfig.node.json +0 -24
  198. package/gui/vite.config.ts +0 -12
  199. package/resources/workflows/plan-implement-review.md +0 -8
  200. package/resources/workflows/research-verify.md +0 -6
  201. package/resources/workflows/solo-developer.md +0 -3
  202. package/scripts/simulate-workspaces.ts +0 -55
  203. package/skills-lock.json +0 -11
  204. package/src/analyzers/detect-apis.ts +0 -290
  205. package/src/analyzers/detect-deps.ts +0 -315
  206. package/src/analyzers/detect-existing.ts +0 -74
  207. package/src/analyzers/detect-ports.ts +0 -110
  208. package/src/analyzers/index.ts +0 -97
  209. package/src/analyzers/messaging-analyzer.ts +0 -254
  210. package/src/analyzers/readme-summarizer.ts +0 -102
  211. package/src/analyzers/run-analyzer.ts +0 -269
  212. package/src/analyzers/tech-stack.ts +0 -283
  213. package/src/commands/adapter.ts +0 -348
  214. package/src/commands/add-repo.ts +0 -156
  215. package/src/commands/commands.test.ts +0 -156
  216. package/src/commands/commit.ts +0 -131
  217. package/src/commands/config.ts +0 -52
  218. package/src/commands/create.ts +0 -204
  219. package/src/commands/desktop.ts +0 -128
  220. package/src/commands/diff.ts +0 -125
  221. package/src/commands/doctor.ts +0 -370
  222. package/src/commands/handoff.ts +0 -266
  223. package/src/commands/init.ts +0 -134
  224. package/src/commands/list.ts +0 -46
  225. package/src/commands/logs.ts +0 -63
  226. package/src/commands/mcp.ts +0 -94
  227. package/src/commands/open.ts +0 -129
  228. package/src/commands/refresh.ts +0 -137
  229. package/src/commands/remove.ts +0 -98
  230. package/src/commands/start.ts +0 -117
  231. package/src/commands/status.ts +0 -54
  232. package/src/commands/stop.ts +0 -55
  233. package/src/commands/sync.ts +0 -125
  234. package/src/commands/tui.ts +0 -484
  235. package/src/commands/ui.ts +0 -111
  236. package/src/core/adapters/local-storage.ts +0 -66
  237. package/src/core/adapters/obsidian-storage.ts +0 -151
  238. package/src/core/adapters/registry.ts +0 -44
  239. package/src/core/adapters/storage.test.ts +0 -174
  240. package/src/core/adapters/vault-storage.ts +0 -86
  241. package/src/core/config.test.ts +0 -96
  242. package/src/core/config.ts +0 -140
  243. package/src/core/graph.ts +0 -344
  244. package/src/core/plugins/index.ts +0 -17
  245. package/src/core/plugins/loader.ts +0 -36
  246. package/src/core/ports/storage.ts +0 -71
  247. package/src/core/scanner.test.ts +0 -61
  248. package/src/core/scanner.ts +0 -91
  249. package/src/core/storage.ts +0 -37
  250. package/src/core/sync.ts +0 -121
  251. package/src/core/workspace-state.test.ts +0 -108
  252. package/src/core/workspace-state.ts +0 -130
  253. package/src/core/workspace.ts +0 -487
  254. package/src/core/worktree.ts +0 -120
  255. package/src/generators/antigravity.ts +0 -32
  256. package/src/generators/base.ts +0 -243
  257. package/src/generators/claude.ts +0 -34
  258. package/src/generators/codex.ts +0 -48
  259. package/src/generators/copilot.ts +0 -56
  260. package/src/generators/cursor.ts +0 -44
  261. package/src/generators/diff-context.ts +0 -75
  262. package/src/generators/index.ts +0 -322
  263. package/src/generators/map-generator.test.ts +0 -159
  264. package/src/generators/map-generator.ts +0 -539
  265. package/src/generators/plan-generator.ts +0 -483
  266. package/src/generators/skills-generator.ts +0 -259
  267. package/src/index.ts +0 -539
  268. package/src/mcp/server.ts +0 -338
  269. package/src/orchestration/detect.ts +0 -313
  270. package/src/orchestration/index.ts +0 -7
  271. package/src/orchestration/runner.ts +0 -283
  272. package/src/server.test.ts +0 -618
  273. package/src/server.ts +0 -1402
  274. package/src/types.ts +0 -451
  275. package/src/utils/detect-ai.test.ts +0 -44
  276. package/src/utils/detect-ai.ts +0 -84
  277. package/src/utils/detect-editors.test.ts +0 -48
  278. package/src/utils/detect-editors.ts +0 -57
  279. package/src/utils/git.test.ts +0 -74
  280. package/src/utils/git.ts +0 -117
  281. package/src/utils/local-ai.test.ts +0 -130
  282. package/src/utils/local-ai.ts +0 -116
  283. package/src/utils/multi-git.test.ts +0 -158
  284. package/src/utils/multi-git.ts +0 -405
  285. package/src/utils/prompts.ts +0 -209
  286. package/src/utils/session-finder.ts +0 -483
  287. package/src/utils/system-scanner.test.ts +0 -89
  288. package/src/utils/system-scanner.ts +0 -96
  289. package/src/utils/update-check.ts +0 -286
  290. package/src/utils/workflow-advisor.ts +0 -118
  291. package/src/utils/workflows.test.ts +0 -114
  292. package/src/utils/workflows.ts +0 -178
  293. package/tsconfig.json +0 -19
  294. package/vitest.config.ts +0 -14
@@ -1,653 +0,0 @@
1
- import * as vscode from 'vscode';
2
- import * as http from 'http';
3
- import * as child_process from 'child_process';
4
- import * as path from 'path';
5
- import * as fs from 'fs';
6
-
7
- let serverProcess: child_process.ChildProcess | null = null;
8
- let myStatusBarItem: vscode.StatusBarItem | null = null;
9
-
10
- function checkServerRunning(): Promise<boolean> {
11
- return new Promise((resolve) => {
12
- const req = http.get('http://localhost:3000/api/config', (res) => {
13
- resolve(res.statusCode === 200);
14
- });
15
- req.on('error', () => {
16
- resolve(false);
17
- });
18
- req.setTimeout(1000, () => {
19
- req.destroy();
20
- resolve(false);
21
- });
22
- });
23
- }
24
-
25
- async function startHonoServer(context: vscode.ExtensionContext) {
26
- const isRunning = await checkServerRunning();
27
- if (isRunning) {
28
- console.log('Hono server is already running.');
29
- return;
30
- }
31
-
32
- console.log('Starting Hono server...');
33
- const serverScript = path.join(context.extensionPath, '..', 'dist', 'index.js');
34
-
35
- serverProcess = child_process.spawn('node', [serverScript, 'ui'], {
36
- cwd: path.join(context.extensionPath, '..'),
37
- env: { ...process.env, PORT: '3000' },
38
- detached: false
39
- });
40
-
41
- serverProcess.stdout?.on('data', (data) => {
42
- console.log(`[Hono Server]: ${data}`);
43
- });
44
-
45
- serverProcess.stderr?.on('data', (data) => {
46
- console.error(`[Hono Server Error]: ${data}`);
47
- });
48
-
49
- serverProcess.on('close', (code) => {
50
- console.log(`Hono server exited with code ${code}`);
51
- serverProcess = null;
52
- });
53
- }
54
-
55
- export function activate(context: vscode.ExtensionContext) {
56
- console.log('NexusFlow extension is activating...');
57
-
58
- // Start Hono server in background if not running
59
- startHonoServer(context);
60
-
61
- // Scope keybindings to workspaces where nexusflow.json exists
62
- vscode.commands.executeCommand('setContext', 'nexusflow.workspaceActive', true);
63
-
64
- // Initialize Status Bar Item
65
- myStatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 100);
66
- myStatusBarItem.command = 'nexusflow.openTui';
67
- context.subscriptions.push(myStatusBarItem);
68
- context.subscriptions.push(vscode.workspace.onDidChangeWorkspaceFolders(updateStatusBarItem));
69
- updateStatusBarItem();
70
-
71
- // Register Webview Provider
72
- const provider = new NexusFlowSidebarProvider(context);
73
- context.subscriptions.push(
74
- vscode.window.registerWebviewViewProvider(
75
- NexusFlowSidebarProvider.viewType,
76
- provider
77
- )
78
- );
79
-
80
- // Register MCP Server Definition Provider if supported by the VS Code version
81
- if (typeof (vscode as any).lm?.registerMcpServerDefinitionProvider === 'function') {
82
- const mcpProvider = {
83
- provideMcpServerDefinitions: async () => {
84
- const serverScript = path.join(context.extensionPath, '..', 'dist', 'index.js');
85
- const workspaceFolders = vscode.workspace.workspaceFolders;
86
- const args = [serverScript, 'mcp', 'run'];
87
- if (workspaceFolders && workspaceFolders.length > 0) {
88
- args.push(workspaceFolders[0].uri.fsPath);
89
- }
90
-
91
- return [
92
- new (vscode as any).McpStdioServerDefinition({
93
- label: 'NexusFlow MCP Server',
94
- command: 'node',
95
- args: args
96
- })
97
- ];
98
- }
99
- };
100
- context.subscriptions.push(
101
- (vscode as any).lm.registerMcpServerDefinitionProvider('nexusflow-mcp', mcpProvider)
102
- );
103
- console.log('NexusFlow MCP Server Definition Provider registered successfully.');
104
- } else {
105
- console.log('registerMcpServerDefinitionProvider is not supported on this VS Code version.');
106
- }
107
-
108
- // Register Focus Dashboard Command
109
- context.subscriptions.push(
110
- vscode.commands.registerCommand('nexusflow.openDashboard', () => {
111
- vscode.commands.executeCommand('workbench.view.extension.nexusflow-sidebar');
112
- })
113
- );
114
-
115
- // Register Open Browser Dashboard Command
116
- context.subscriptions.push(
117
- vscode.commands.registerCommand('nexusflow.openBrowserDashboard', () => {
118
- vscode.env.openExternal(vscode.Uri.parse('http://localhost:3000'));
119
- })
120
- );
121
-
122
- // Register Open TUI Command
123
- context.subscriptions.push(
124
- vscode.commands.registerCommand('nexusflow.openTui', () => {
125
- runNexusFlowCommand(context, 'tui');
126
- })
127
- );
128
-
129
- // Register Create Workspace Command
130
- context.subscriptions.push(
131
- vscode.commands.registerCommand('nexusflow.createWorkspace', () => {
132
- runNexusFlowCommand(context, 'create');
133
- })
134
- );
135
-
136
- // Register Sync Workspace Command
137
- context.subscriptions.push(
138
- vscode.commands.registerCommand('nexusflow.syncWorkspace', () => {
139
- runNexusFlowCommand(context, 'sync');
140
- })
141
- );
142
-
143
- // Register Run Doctor Command
144
- context.subscriptions.push(
145
- vscode.commands.registerCommand('nexusflow.runDoctor', () => {
146
- runNexusFlowCommand(context, 'doctor');
147
- })
148
- );
149
-
150
- // Register Commit Workspace Command
151
- context.subscriptions.push(
152
- vscode.commands.registerCommand('nexusflow.commitWorkspace', async () => {
153
- const message = await vscode.window.showInputBox({
154
- prompt: 'Enter commit message for all changed repositories in the workspace:',
155
- placeHolder: 'e.g., feat: implement new UI components'
156
- });
157
- if (message) {
158
- runNexusFlowCommand(context, `commit "${message.replace(/"/g, '\\"')}"`);
159
- }
160
- })
161
- );
162
- }
163
-
164
- function runNexusFlowCommand(context: vscode.ExtensionContext, command: string) {
165
- const folders = vscode.workspace.workspaceFolders;
166
- const isCreate = command.startsWith('create');
167
-
168
- if (!isCreate && (!folders || folders.length === 0)) {
169
- vscode.window.showErrorMessage('No active workspace folders found.');
170
- return;
171
- }
172
-
173
- const cwd = (folders && folders.length > 0) ? folders[0].uri.fsPath : undefined;
174
- const serverScript = path.join(context.extensionPath, '..', 'dist', 'index.js');
175
-
176
- let terminal = vscode.window.terminals.find((t: vscode.Terminal) => t.name === "NexusFlow Runner");
177
- if (!terminal) {
178
- terminal = vscode.window.createTerminal({
179
- name: "NexusFlow Runner",
180
- cwd: cwd
181
- });
182
- } else {
183
- // send Ctrl+C to cancel any active operations
184
- terminal.sendText('\u0003', true);
185
- }
186
- terminal.show(true);
187
- const escapedScriptPath = `"${serverScript}"`;
188
- terminal.sendText(`node ${escapedScriptPath} ${command}`);
189
- }
190
-
191
- export function deactivate() {
192
- if (serverProcess) {
193
- console.log('Stopping Hono server...');
194
- serverProcess.kill();
195
- }
196
- }
197
-
198
- function getWorkspaceDetails(): any {
199
- const folders = vscode.workspace.workspaceFolders;
200
- if (!folders || folders.length === 0) {
201
- return { hasWorkspace: false };
202
- }
203
- const rootPath = folders[0].uri.fsPath;
204
- const manifestPath = path.join(rootPath, 'nexusflow.json');
205
- if (!fs.existsSync(manifestPath)) {
206
- return { hasWorkspace: false };
207
- }
208
- try {
209
- const content = fs.readFileSync(manifestPath, 'utf8');
210
- const data = JSON.parse(content);
211
- return {
212
- hasWorkspace: true,
213
- rootPath,
214
- id: data.id || data.branchName,
215
- branchName: data.branchName,
216
- description: data.description || 'No description',
217
- repos: (data.repos || []).map((repo: string) => ({
218
- name: path.basename(repo),
219
- path: repo
220
- }))
221
- };
222
- } catch (e) {
223
- return { hasWorkspace: false };
224
- }
225
- }
226
-
227
- class NexusFlowSidebarProvider implements vscode.WebviewViewProvider {
228
- public static readonly viewType = 'nexusflow.dashboardView';
229
- private _view?: vscode.WebviewView;
230
-
231
- constructor(
232
- private readonly _context: vscode.ExtensionContext,
233
- ) { }
234
-
235
- public resolveWebviewView(
236
- webviewView: vscode.WebviewView,
237
- context: vscode.WebviewViewResolveContext,
238
- _token: vscode.CancellationToken,
239
- ) {
240
- this._view = webviewView;
241
-
242
- webviewView.webview.options = {
243
- enableScripts: true,
244
- localResourceRoots: [
245
- this._context.extensionUri
246
- ]
247
- };
248
-
249
- webviewView.webview.html = this._getHtmlForWebview(webviewView.webview);
250
-
251
- webviewView.webview.onDidReceiveMessage((data: any) => {
252
- switch (data.type) {
253
- case 'openWorkspaceFolder': {
254
- const uri = vscode.Uri.file(data.workspacePath);
255
- vscode.commands.executeCommand('vscode.openFolder', uri, false);
256
- break;
257
- }
258
- case 'openFile': {
259
- const uri = vscode.Uri.file(data.filePath);
260
- vscode.workspace.openTextDocument(uri).then((doc: vscode.TextDocument) => {
261
- vscode.window.showTextDocument(doc);
262
- });
263
- break;
264
- }
265
- case 'getWorkspaceStatus': {
266
- const details = getWorkspaceDetails();
267
- webviewView.webview.postMessage({ type: 'workspaceStatus', details });
268
- break;
269
- }
270
- case 'runCommand': {
271
- runNexusFlowCommand(this._context, data.command);
272
- break;
273
- }
274
- case 'triggerCommand': {
275
- vscode.commands.executeCommand(data.command);
276
- break;
277
- }
278
- case 'executeTerminalCommand': {
279
- let terminal = vscode.window.terminals.find((t: vscode.Terminal) => t.name === "NexusFlow Runner");
280
- if (!terminal) {
281
- terminal = vscode.window.createTerminal({
282
- name: "NexusFlow Runner",
283
- cwd: data.cwd
284
- });
285
- } else {
286
- // send Ctrl+C to cancel any active operations
287
- terminal.sendText('\u0003', true);
288
- }
289
- terminal.show(true);
290
- terminal.sendText(data.command);
291
- break;
292
- }
293
- }
294
- });
295
- }
296
-
297
- private _getHtmlForWebview(webview: vscode.Webview) {
298
- const nonce = getNonce();
299
- const codiconsUri = webview.asWebviewUri(
300
- vscode.Uri.joinPath(this._context.extensionUri, 'node_modules', '@vscode/codicons', 'dist', 'codicon.css')
301
- );
302
- return `<!DOCTYPE html>
303
- <html lang="en">
304
- <head>
305
- <meta charset="UTF-8">
306
- <meta http-equiv="Content-Security-Policy"
307
- content="default-src 'none';
308
- style-src ${webview.cspSource} 'unsafe-inline';
309
- script-src 'nonce-${nonce}';
310
- font-src ${webview.cspSource};">
311
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
312
- <link href="${codiconsUri}" rel="stylesheet" />
313
- <title>NexusFlow Sidebar Console</title>
314
- <style>
315
- :root {
316
- --bg-base: var(--vscode-sideBar-background, #080a13);
317
- --bg-surface: var(--vscode-editor-background, #0d1127);
318
- --accent-cyan: #00f0ff;
319
- --accent-green: #39ff14;
320
- --text-primary: var(--vscode-sideBar-foreground, #f0f3ff);
321
- --text-secondary: var(--vscode-descriptionForeground, #8e9bb4);
322
- --border-color: rgba(0, 240, 255, 0.15);
323
- }
324
-
325
- * {
326
- box-sizing: border-box;
327
- margin: 0;
328
- padding: 0;
329
- }
330
-
331
- body {
332
- font-family: var(--vscode-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
333
- background-color: var(--bg-base);
334
- color: var(--text-primary);
335
- padding: 12px;
336
- font-size: 13px;
337
- overflow-y: auto;
338
- min-height: 100vh;
339
- }
340
-
341
- /* Header block */
342
- .header {
343
- display: flex;
344
- justify-content: space-between;
345
- align-items: center;
346
- border-bottom: 1px solid var(--border-color);
347
- padding-bottom: 8px;
348
- margin-bottom: 15px;
349
- }
350
-
351
- .header h3 {
352
- font-size: 14px;
353
- font-weight: bold;
354
- color: var(--text-primary);
355
- letter-spacing: 0.5px;
356
- display: flex;
357
- align-items: center;
358
- gap: 6px;
359
- }
360
-
361
- .status-indicator {
362
- display: flex;
363
- align-items: center;
364
- gap: 6px;
365
- font-size: 11px;
366
- color: var(--accent-cyan);
367
- font-family: monospace;
368
- }
369
-
370
- .status-dot {
371
- width: 7px;
372
- height: 7px;
373
- border-radius: 50%;
374
- background-color: var(--accent-green);
375
- box-shadow: 0 0 6px var(--accent-green);
376
- }
377
-
378
- /* Card Container */
379
- .card {
380
- background-color: var(--bg-surface);
381
- border: 1px solid rgba(255, 255, 255, 0.05);
382
- border-radius: 8px;
383
- padding: 12px;
384
- margin-bottom: 15px;
385
- box-shadow: 0 4px 12px rgba(0,0,0,0.25);
386
- }
387
-
388
- .card h4 {
389
- font-size: 12px;
390
- color: var(--accent-cyan);
391
- text-transform: uppercase;
392
- letter-spacing: 0.5px;
393
- margin-bottom: 6px;
394
- }
395
-
396
- .branch-badge {
397
- font-family: monospace;
398
- background: rgba(0, 240, 255, 0.08);
399
- border: 1px solid rgba(0, 240, 255, 0.2);
400
- color: var(--accent-cyan);
401
- padding: 4px 8px;
402
- border-radius: 4px;
403
- display: inline-block;
404
- margin-bottom: 8px;
405
- font-weight: bold;
406
- }
407
-
408
- .desc-text {
409
- color: var(--text-secondary);
410
- font-size: 12px;
411
- line-height: 1.4;
412
- }
413
-
414
- /* Action Buttons Grid */
415
- .btn-grid {
416
- display: grid;
417
- grid-template-columns: 1fr 1fr;
418
- gap: 8px;
419
- margin-bottom: 15px;
420
- }
421
-
422
- .btn {
423
- background: rgba(0, 240, 255, 0.06);
424
- border: 1px solid rgba(0, 240, 255, 0.2);
425
- color: var(--accent-cyan);
426
- border-radius: 4px;
427
- padding: 8px 12px;
428
- font-size: 12px;
429
- font-weight: 600;
430
- cursor: pointer;
431
- display: flex;
432
- align-items: center;
433
- justify-content: center;
434
- gap: 6px;
435
- transition: all 0.2s ease;
436
- }
437
-
438
- .btn:hover {
439
- background: var(--accent-cyan);
440
- color: black;
441
- box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
442
- }
443
-
444
- .btn-primary {
445
- grid-column: span 2;
446
- background: var(--accent-cyan);
447
- color: black;
448
- font-weight: bold;
449
- }
450
-
451
- .btn-primary:hover {
452
- background: #00d0de;
453
- }
454
-
455
- /* File Links List */
456
- .file-list {
457
- list-style: none;
458
- }
459
-
460
- .file-row {
461
- display: flex;
462
- align-items: center;
463
- gap: 8px;
464
- padding: 6px 8px;
465
- border-radius: 4px;
466
- cursor: pointer;
467
- color: var(--text-secondary);
468
- transition: all 0.2s ease;
469
- }
470
-
471
- .file-row:hover {
472
- background: rgba(255, 255, 255, 0.03);
473
- color: var(--text-primary);
474
- }
475
-
476
- .file-icon {
477
- color: var(--accent-cyan);
478
- font-size: 14px;
479
- }
480
-
481
- /* Loading / Wizard view */
482
- .loading-view, .wizard-view {
483
- display: flex;
484
- flex-direction: column;
485
- align-items: center;
486
- justify-content: center;
487
- padding: 30px 15px;
488
- text-align: center;
489
- }
490
-
491
- .wizard-icon {
492
- font-size: 32px;
493
- margin-bottom: 12px;
494
- animation: pulse 2s infinite;
495
- }
496
-
497
- .wizard-text {
498
- color: var(--text-secondary);
499
- margin-bottom: 20px;
500
- line-height: 1.5;
501
- }
502
- </style>
503
- </head>
504
- <body>
505
-
506
- <div class="header">
507
- <h3><i class="codicon codicon-extensions"></i> NexusFlow</h3>
508
- <div class="status-indicator">
509
- <div class="status-dot"></div>
510
- <span>ACTIVE</span>
511
- </div>
512
- </div>
513
-
514
- <!-- Active Workspace View -->
515
- <div id="workspace-view" style="display: none;">
516
- <div class="card">
517
- <h4>Active Feature</h4>
518
- <div class="branch-badge" id="branch-badge">🌿 improve_nexusflow</div>
519
- <div class="desc-text" id="workspace-desc">Loading workspace description...</div>
520
- </div>
521
-
522
- <div class="btn-grid">
523
- <button class="btn" onclick="runCommand('tui')"><i class="codicon codicon-terminal"></i> Open TUI</button>
524
- <button class="btn" onclick="runCommand('sync')"><i class="codicon codicon-sync"></i> Rebase Sync</button>
525
- <button class="btn" onclick="runCommand('doctor')"><i class="codicon codicon-pulse"></i> Run Doctor</button>
526
- <button class="btn" onclick="triggerCommand('nexusflow.commitWorkspace')"><i class="codicon codicon-git-commit"></i> Commit</button>
527
- </div>
528
-
529
- <div class="card">
530
- <h4>Workspace Repositories</h4>
531
- <ul class="file-list" id="repo-list">
532
- <!-- Repo items injected here -->
533
- </ul>
534
- </div>
535
-
536
- <div class="card">
537
- <h4>Core Context Files</h4>
538
- <ul class="file-list" id="context-files">
539
- <!-- Links injected here -->
540
- </ul>
541
- </div>
542
- </div>
543
-
544
- <!-- Empty Wizard Setup View -->
545
- <div id="wizard-view" style="display: none;" class="wizard-view">
546
- <div class="wizard-icon"><i class="codicon codicon-rocket"></i></div>
547
- <h4 style="margin-bottom: 8px; font-size: 14px; color: var(--text-primary);">No Workspace Detected</h4>
548
- <p class="wizard-text">NexusFlow coordinates multi-repo workspaces with Git worktrees and auto-generated AI contexts.</p>
549
-
550
- <button class="btn btn-primary" onclick="triggerCommand('nexusflow.createWorkspace')" style="width: 100%; margin-bottom: 10px;">
551
- Initialize Workspace Setup
552
- </button>
553
- <button class="btn" onclick="triggerCommand('nexusflow.openTui')" style="width: 100%;">
554
- Open TUI Dashboard
555
- </button>
556
- </div>
557
-
558
- <!-- Loading View -->
559
- <div id="loading-view" class="loading-view">
560
- <p style="color: var(--text-secondary);">Querying workspace configuration...</p>
561
- </div>
562
-
563
- <script nonce="${nonce}">
564
- const vscode = acquireVsCodeApi();
565
-
566
- // Listen for messages from extension backend
567
- window.addEventListener('message', event => {
568
- const message = event.data;
569
- if (message.type === 'workspaceStatus') {
570
- renderWorkspace(message.details);
571
- }
572
- });
573
-
574
- // Request workspace status on load
575
- vscode.postMessage({ type: 'getWorkspaceStatus' });
576
-
577
- function runCommand(cmd) {
578
- vscode.postMessage({ type: 'runCommand', command: cmd });
579
- }
580
-
581
- function triggerCommand(cmd) {
582
- vscode.postMessage({ type: 'triggerCommand', command: cmd });
583
- }
584
-
585
- function openFile(path) {
586
- vscode.postMessage({ type: 'openFile', filePath: path });
587
- }
588
-
589
- function renderWorkspace(details) {
590
- document.getElementById('loading-view').style.display = 'none';
591
-
592
- if (details.hasWorkspace) {
593
- document.getElementById('wizard-view').style.display = 'none';
594
- document.getElementById('workspace-view').style.display = 'block';
595
-
596
- document.getElementById('branch-badge').innerText = '🌿 ' + details.branchName;
597
- document.getElementById('workspace-desc').innerText = details.description;
598
-
599
- // Render Repos list
600
- const repoList = document.getElementById('repo-list');
601
- repoList.innerHTML = details.repos.map(r => \`
602
- <li class="file-row" onclick="openFile('\${r.path.replace(/\\\\/g, '/')}')">
603
- <i class="codicon codicon-folder file-icon"></i>
604
- <span>\${r.name}</span>
605
- </li>
606
- \`).join('');
607
-
608
- // Render Core Context Files list
609
- const contextFiles = document.getElementById('context-files');
610
- const root = details.rootPath.replace(/\\\\/g, '/');
611
- const files = ['WORKSPACE.md', 'nexusflow-knowledge.md', 'nexusflow-plan.md'];
612
- contextFiles.innerHTML = files.map(file => \`
613
- <li class="file-row" onclick="openFile('\${root}/\${file}')">
614
- <i class="codicon codicon-file-text file-icon"></i>
615
- <span>\${file}</span>
616
- </li>
617
- \`).join('');
618
-
619
- } else {
620
- document.getElementById('workspace-view').style.display = 'none';
621
- document.getElementById('wizard-view').style.display = 'block';
622
- }
623
- }
624
- </script>
625
- </body>
626
- </html>`;
627
- }
628
- }
629
-
630
- function getNonce(): string {
631
- let text = '';
632
- const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
633
- for (let i = 0; i < 32; i++) {
634
- text += possible.charAt(Math.floor(Math.random() * possible.length));
635
- }
636
- return text;
637
- }
638
-
639
- function updateStatusBarItem() {
640
- if (!myStatusBarItem) {
641
- return;
642
- }
643
- const folders = vscode.workspace.workspaceFolders;
644
- if (folders && folders.length > 0) {
645
- const branchName = path.basename(folders[0].uri.fsPath);
646
- myStatusBarItem.text = `$(git-branch) NexusFlow: ${branchName}`;
647
- myStatusBarItem.tooltip = 'Click to open NexusFlow Terminal Console (TUI)';
648
- myStatusBarItem.show();
649
- } else {
650
- myStatusBarItem.hide();
651
- }
652
- }
653
-
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "node16",
4
- "target": "ES2022",
5
- "outDir": "dist",
6
- "lib": [
7
- "ES2022"
8
- ],
9
- "sourceMap": true,
10
- "strict": true,
11
- "rootDir": "src",
12
- "moduleResolution": "node16",
13
- "types": ["node"],
14
- "skipLibCheck": true,
15
- "esModuleInterop": true
16
- },
17
- "exclude": [
18
- "node_modules",
19
- ".vscode-test"
20
- ]
21
- }