@mrpatronz/nexusflow 0.2.19 → 1.3.0
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/README.md +27 -3
- package/dist/analyzers/index.d.ts +23 -0
- package/dist/analyzers/index.d.ts.map +1 -1
- package/dist/analyzers/index.js +62 -0
- package/dist/analyzers/index.js.map +1 -1
- package/dist/commands/commands.test.js +20 -6
- package/dist/commands/commands.test.js.map +1 -1
- package/dist/commands/commit.d.ts +2 -0
- package/dist/commands/commit.d.ts.map +1 -1
- package/dist/commands/commit.js +27 -5
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/diff.d.ts +9 -2
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +36 -12
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/handoff.js +2 -2
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/refresh.d.ts +4 -2
- package/dist/commands/refresh.d.ts.map +1 -1
- package/dist/commands/refresh.js +20 -36
- package/dist/commands/refresh.js.map +1 -1
- package/dist/commands/schedule.d.ts +35 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/schedule.js +151 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +28 -7
- package/dist/commands/sync.js.map +1 -1
- package/dist/core/analysis-cache.d.ts +58 -0
- package/dist/core/analysis-cache.d.ts.map +1 -0
- package/dist/core/analysis-cache.js +116 -0
- package/dist/core/analysis-cache.js.map +1 -0
- package/dist/core/analysis-cache.test.d.ts +2 -0
- package/dist/core/analysis-cache.test.d.ts.map +1 -0
- package/dist/core/analysis-cache.test.js +108 -0
- package/dist/core/analysis-cache.test.js.map +1 -0
- package/dist/core/refresh.d.ts +41 -0
- package/dist/core/refresh.d.ts.map +1 -0
- package/dist/core/refresh.js +60 -0
- package/dist/core/refresh.js.map +1 -0
- package/dist/core/scheduler.d.ts +117 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +247 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/scheduler.test.d.ts +2 -0
- package/dist/core/scheduler.test.d.ts.map +1 -0
- package/dist/core/scheduler.test.js +111 -0
- package/dist/core/scheduler.test.js.map +1 -0
- package/dist/core/sync.d.ts +6 -0
- package/dist/core/sync.d.ts.map +1 -1
- package/dist/core/sync.js +15 -5
- package/dist/core/sync.js.map +1 -1
- package/dist/generators/index.d.ts +7 -1
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +14 -1
- package/dist/generators/index.js.map +1 -1
- package/dist/index.js +107 -4
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +81 -0
- package/dist/server.js.map +1 -1
- package/dist/server.test.js +66 -0
- package/dist/server.test.js.map +1 -1
- package/dist/utils/multi-git.d.ts +21 -0
- package/dist/utils/multi-git.d.ts.map +1 -1
- package/dist/utils/multi-git.js +40 -4
- package/dist/utils/multi-git.js.map +1 -1
- package/package.json +13 -1
- package/.agents/skills/ccc/SKILL.md +0 -71
- package/.agents/skills/ccc/references/management.md +0 -110
- package/.agents/skills/ccc/references/settings.md +0 -126
- package/.github/dependabot.yml +0 -52
- package/.github/workflows/ci.yml +0 -44
- package/.github/workflows/dependabot-merge.yml +0 -53
- package/.github/workflows/release-desktop.yml +0 -67
- package/.github/workflows/release-npm.yml +0 -65
- package/.github/workflows/release-vscode.yml +0 -61
- package/.vscode/launch.json +0 -17
- package/.vscode/tasks.json +0 -17
- package/GETTING_STARTED.md +0 -114
- package/desktop/build-installer.js +0 -228
- package/desktop/build.js +0 -118
- package/desktop/installer/nexusflow.iss +0 -35
- package/desktop/neutralino.config.json +0 -39
- package/desktop/package-lock.json +0 -1060
- package/desktop/package.json +0 -14
- package/extension/media/icon.svg +0 -1
- package/extension/package-lock.json +0 -6044
- package/extension/package.json +0 -117
- package/extension/src/extension.ts +0 -653
- package/extension/tsconfig.json +0 -21
- package/gui/README.md +0 -73
- package/gui/e2e/dashboard.spec.ts +0 -61
- package/gui/e2e/wizard.spec.ts +0 -346
- package/gui/eslint.config.js +0 -26
- package/gui/index.html +0 -17
- package/gui/package-lock.json +0 -3137
- package/gui/package.json +0 -37
- package/gui/playwright.config.ts +0 -41
- package/gui/public/app_logo.png +0 -0
- package/gui/public/favicon.svg +0 -1
- package/gui/public/icons.svg +0 -24
- package/gui/src/App.css +0 -1
- package/gui/src/App.tsx +0 -3573
- package/gui/src/app/AppSidebar.tsx +0 -69
- package/gui/src/assets/hero.png +0 -0
- package/gui/src/assets/react.svg +0 -1
- package/gui/src/assets/vite.svg +0 -1
- package/gui/src/components/AddRepoPicker.tsx +0 -81
- package/gui/src/components/ui/Button.tsx +0 -40
- package/gui/src/components/ui/Card.tsx +0 -6
- package/gui/src/components/ui/EmptyState.tsx +0 -22
- package/gui/src/components/ui/Input.tsx +0 -21
- package/gui/src/components/ui/Menu.tsx +0 -71
- package/gui/src/components/ui/Modal.tsx +0 -39
- package/gui/src/components/ui/PageHeader.tsx +0 -21
- package/gui/src/components/ui/RepoStatusStrip.tsx +0 -33
- package/gui/src/components/ui/Skeleton.tsx +0 -5
- package/gui/src/components/ui/StatusPill.tsx +0 -36
- package/gui/src/components/ui/Tabs.tsx +0 -40
- package/gui/src/components/ui/cn.ts +0 -4
- package/gui/src/components/ui/index.ts +0 -16
- package/gui/src/features/changes/ChangesViewer.tsx +0 -388
- package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
- package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
- package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
- package/gui/src/features/services/ServiceConsole.tsx +0 -215
- package/gui/src/features/sessions/SessionHistory.tsx +0 -195
- package/gui/src/index.css +0 -167
- package/gui/src/lib/status.ts +0 -24
- package/gui/src/main.tsx +0 -94
- package/gui/src/pages/DashboardPage.tsx +0 -129
- package/gui/src/pages/WorkspacesPage.tsx +0 -352
- package/gui/src/types.ts +0 -81
- package/gui/tsconfig.app.json +0 -25
- package/gui/tsconfig.json +0 -7
- package/gui/tsconfig.node.json +0 -24
- package/gui/vite.config.ts +0 -12
- package/resources/workflows/plan-implement-review.md +0 -8
- package/resources/workflows/research-verify.md +0 -6
- package/resources/workflows/solo-developer.md +0 -3
- package/scripts/simulate-workspaces.ts +0 -55
- package/skills-lock.json +0 -11
- package/src/analyzers/detect-apis.ts +0 -290
- package/src/analyzers/detect-deps.ts +0 -315
- package/src/analyzers/detect-existing.ts +0 -74
- package/src/analyzers/detect-ports.ts +0 -110
- package/src/analyzers/index.ts +0 -97
- package/src/analyzers/messaging-analyzer.ts +0 -254
- package/src/analyzers/readme-summarizer.ts +0 -102
- package/src/analyzers/run-analyzer.ts +0 -269
- package/src/analyzers/tech-stack.ts +0 -283
- package/src/commands/adapter.ts +0 -348
- package/src/commands/add-repo.ts +0 -156
- package/src/commands/commands.test.ts +0 -156
- package/src/commands/commit.ts +0 -131
- package/src/commands/config.ts +0 -52
- package/src/commands/create.ts +0 -204
- package/src/commands/desktop.ts +0 -128
- package/src/commands/diff.ts +0 -125
- package/src/commands/doctor.ts +0 -370
- package/src/commands/handoff.ts +0 -266
- package/src/commands/init.ts +0 -134
- package/src/commands/list.ts +0 -46
- package/src/commands/logs.ts +0 -63
- package/src/commands/mcp.ts +0 -94
- package/src/commands/open.ts +0 -129
- package/src/commands/refresh.ts +0 -137
- package/src/commands/remove.ts +0 -98
- package/src/commands/start.ts +0 -117
- package/src/commands/status.ts +0 -54
- package/src/commands/stop.ts +0 -55
- package/src/commands/sync.ts +0 -125
- package/src/commands/tui.ts +0 -484
- package/src/commands/ui.ts +0 -111
- package/src/core/adapters/local-storage.ts +0 -66
- package/src/core/adapters/obsidian-storage.ts +0 -151
- package/src/core/adapters/registry.ts +0 -44
- package/src/core/adapters/storage.test.ts +0 -174
- package/src/core/adapters/vault-storage.ts +0 -86
- package/src/core/config.test.ts +0 -96
- package/src/core/config.ts +0 -140
- package/src/core/graph.ts +0 -344
- package/src/core/plugins/index.ts +0 -17
- package/src/core/plugins/loader.ts +0 -36
- package/src/core/ports/storage.ts +0 -71
- package/src/core/scanner.test.ts +0 -61
- package/src/core/scanner.ts +0 -91
- package/src/core/storage.ts +0 -37
- package/src/core/sync.ts +0 -121
- package/src/core/workspace-state.test.ts +0 -108
- package/src/core/workspace-state.ts +0 -130
- package/src/core/workspace.ts +0 -487
- package/src/core/worktree.ts +0 -120
- package/src/generators/antigravity.ts +0 -32
- package/src/generators/base.ts +0 -243
- package/src/generators/claude.ts +0 -34
- package/src/generators/codex.ts +0 -48
- package/src/generators/copilot.ts +0 -56
- package/src/generators/cursor.ts +0 -44
- package/src/generators/diff-context.ts +0 -75
- package/src/generators/index.ts +0 -322
- package/src/generators/map-generator.test.ts +0 -159
- package/src/generators/map-generator.ts +0 -539
- package/src/generators/plan-generator.ts +0 -483
- package/src/generators/skills-generator.ts +0 -259
- package/src/index.ts +0 -539
- package/src/mcp/server.ts +0 -338
- package/src/orchestration/detect.ts +0 -313
- package/src/orchestration/index.ts +0 -7
- package/src/orchestration/runner.ts +0 -283
- package/src/server.test.ts +0 -618
- package/src/server.ts +0 -1402
- package/src/types.ts +0 -451
- package/src/utils/detect-ai.test.ts +0 -44
- package/src/utils/detect-ai.ts +0 -84
- package/src/utils/detect-editors.test.ts +0 -48
- package/src/utils/detect-editors.ts +0 -57
- package/src/utils/git.test.ts +0 -74
- package/src/utils/git.ts +0 -117
- package/src/utils/local-ai.test.ts +0 -130
- package/src/utils/local-ai.ts +0 -116
- package/src/utils/multi-git.test.ts +0 -158
- package/src/utils/multi-git.ts +0 -405
- package/src/utils/prompts.ts +0 -209
- package/src/utils/session-finder.ts +0 -483
- package/src/utils/system-scanner.test.ts +0 -89
- package/src/utils/system-scanner.ts +0 -96
- package/src/utils/update-check.ts +0 -286
- package/src/utils/workflow-advisor.ts +0 -118
- package/src/utils/workflows.test.ts +0 -114
- package/src/utils/workflows.ts +0 -178
- package/tsconfig.json +0 -19
- 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
|
-
|
package/extension/tsconfig.json
DELETED
|
@@ -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
|
-
}
|