@mrpatronz/nexusflow 0.1.0 → 0.1.2
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/.github/dependabot.yml +25 -0
- package/.github/workflows/release.yml +90 -0
- package/.vscode/launch.json +17 -0
- package/.vscode/tasks.json +17 -0
- package/README.md +1 -1
- package/dist/commands/commit.d.ts +18 -0
- package/dist/commands/commit.d.ts.map +1 -0
- package/dist/commands/commit.js +105 -0
- package/dist/commands/commit.js.map +1 -0
- package/dist/commands/diff.d.ts +11 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +101 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/sync.d.ts +11 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +96 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/generators/base.d.ts.map +1 -1
- package/dist/generators/base.js +3 -0
- package/dist/generators/base.js.map +1 -1
- package/dist/generators/index.d.ts +5 -2
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +88 -38
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/plan-generator.d.ts +40 -0
- package/dist/generators/plan-generator.d.ts.map +1 -0
- package/dist/generators/plan-generator.js +312 -0
- package/dist/generators/plan-generator.js.map +1 -0
- package/dist/gui/assets/index-B9Ph2bHH.css +2 -0
- package/dist/gui/assets/index-s4nRkpqY.js +21 -0
- package/dist/gui/index.html +2 -2
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +141 -1
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/multi-git.d.ts +108 -0
- package/dist/utils/multi-git.d.ts.map +1 -0
- package/dist/utils/multi-git.js +206 -0
- package/dist/utils/multi-git.js.map +1 -0
- package/extension/package-lock.json +2811 -0
- package/extension/package.json +61 -0
- package/extension/src/extension.ts +168 -0
- package/extension/tsconfig.json +19 -0
- package/gui/src/App.tsx +377 -24
- package/gui/src/features/changes/ChangesViewer.tsx +212 -0
- package/gui/src/features/knowledge/KnowledgeBase.tsx +84 -0
- package/gui/src/features/onboarding/OnboardingWizard.tsx +230 -0
- package/gui/src/features/plan/ImplementationPlan.tsx +32 -0
- package/gui/src/features/services/ServiceConsole.tsx +159 -0
- package/gui/src/features/sessions/SessionHistory.tsx +195 -0
- package/gui/src/features/workspace/WorkspaceBuilder.tsx +414 -0
- package/gui/src/features/workspace/WorkspaceList.tsx +382 -0
- package/gui/src/types.ts +61 -0
- package/package.json +6 -4
- package/src/commands/commit.ts +131 -0
- package/src/commands/diff.ts +125 -0
- package/src/commands/sync.ts +110 -0
- package/src/generators/base.ts +3 -0
- package/src/generators/index.ts +95 -40
- package/src/generators/plan-generator.ts +390 -0
- package/src/index.ts +59 -0
- package/src/server.ts +152 -1
- package/src/types.ts +17 -0
- package/src/utils/multi-git.ts +306 -0
- package/dist/gui/assets/index-Cq9V485S.js +0 -21
- package/dist/gui/assets/index-Dh1b5gSZ.css +0 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nexusflow-vscode",
|
|
3
|
+
"displayName": "NexusFlow Multi-Repo Workspace Orchestrator",
|
|
4
|
+
"description": "Manage multiple repositories as a single feature workspace, orchestrate background services, and align AI coding contexts natively inside VS Code.",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"publisher": "nexusflow",
|
|
7
|
+
"engines": {
|
|
8
|
+
"vscode": "^1.80.0"
|
|
9
|
+
},
|
|
10
|
+
"categories": [
|
|
11
|
+
"Other"
|
|
12
|
+
],
|
|
13
|
+
"main": "./dist/extension.js",
|
|
14
|
+
"contributes": {
|
|
15
|
+
"viewsContainers": {
|
|
16
|
+
"activitybar": [
|
|
17
|
+
{
|
|
18
|
+
"id": "nexusflow-sidebar",
|
|
19
|
+
"title": "NexusFlow",
|
|
20
|
+
"icon": "media/icon.svg"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"views": {
|
|
25
|
+
"nexusflow-sidebar": [
|
|
26
|
+
{
|
|
27
|
+
"type": "webview",
|
|
28
|
+
"id": "nexusflow.dashboardView",
|
|
29
|
+
"name": "NexusFlow Dashboard"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"commands": [
|
|
34
|
+
{
|
|
35
|
+
"command": "nexusflow.openDashboard",
|
|
36
|
+
"title": "NexusFlow: Open Dashboard"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"vscode:prepublish": "npm run compile",
|
|
42
|
+
"compile": "tsc -p ./",
|
|
43
|
+
"watch": "tsc -watch -p ./",
|
|
44
|
+
"pretest": "npm run compile && npm run lint",
|
|
45
|
+
"lint": "eslint src --ext ts",
|
|
46
|
+
"test": "node ./out/test/runTest.js"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/vscode": "^1.80.0",
|
|
50
|
+
"@types/glob": "^8.1.0",
|
|
51
|
+
"@types/mocha": "^10.0.1",
|
|
52
|
+
"@types/node": "18.x",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
|
54
|
+
"@typescript-eslint/parser": "^5.59.8",
|
|
55
|
+
"eslint": "^8.41.0",
|
|
56
|
+
"glob": "^8.1.0",
|
|
57
|
+
"mocha": "^10.2.0",
|
|
58
|
+
"typescript": "^5.0.4",
|
|
59
|
+
"@vscode/test-electron": "^2.3.2"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
|
|
6
|
+
let serverProcess: child_process.ChildProcess | null = null;
|
|
7
|
+
|
|
8
|
+
function checkServerRunning(): Promise<boolean> {
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
const req = http.get('http://localhost:3000/api/config', (res) => {
|
|
11
|
+
resolve(res.statusCode === 200);
|
|
12
|
+
});
|
|
13
|
+
req.on('error', () => {
|
|
14
|
+
resolve(false);
|
|
15
|
+
});
|
|
16
|
+
req.setTimeout(1000, () => {
|
|
17
|
+
req.destroy();
|
|
18
|
+
resolve(false);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function startHonoServer(context: vscode.ExtensionContext) {
|
|
24
|
+
const isRunning = await checkServerRunning();
|
|
25
|
+
if (isRunning) {
|
|
26
|
+
console.log('Hono server is already running.');
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.log('Starting Hono server...');
|
|
31
|
+
const serverScript = path.join(context.extensionPath, '..', 'dist', 'index.js');
|
|
32
|
+
|
|
33
|
+
serverProcess = child_process.spawn('node', [serverScript, 'ui'], {
|
|
34
|
+
cwd: path.join(context.extensionPath, '..'),
|
|
35
|
+
env: { ...process.env, PORT: '3000' },
|
|
36
|
+
detached: false
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
serverProcess.stdout?.on('data', (data) => {
|
|
40
|
+
console.log(`[Hono Server]: ${data}`);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
serverProcess.stderr?.on('data', (data) => {
|
|
44
|
+
console.error(`[Hono Server Error]: ${data}`);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
serverProcess.on('close', (code) => {
|
|
48
|
+
console.log(`Hono server exited with code ${code}`);
|
|
49
|
+
serverProcess = null;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function activate(context: vscode.ExtensionContext) {
|
|
54
|
+
console.log('NexusFlow extension is activating...');
|
|
55
|
+
|
|
56
|
+
// Start Hono server in background if not running
|
|
57
|
+
startHonoServer(context);
|
|
58
|
+
|
|
59
|
+
// Register Webview Provider
|
|
60
|
+
const provider = new NexusFlowSidebarProvider(context.extensionUri);
|
|
61
|
+
context.subscriptions.push(
|
|
62
|
+
vscode.window.registerWebviewViewProvider(
|
|
63
|
+
NexusFlowSidebarProvider.viewType,
|
|
64
|
+
provider
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// Register Focus Dashboard Command
|
|
69
|
+
context.subscriptions.push(
|
|
70
|
+
vscode.commands.registerCommand('nexusflow.openDashboard', () => {
|
|
71
|
+
vscode.commands.executeCommand('workbench.view.extension.nexusflow-sidebar');
|
|
72
|
+
})
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function deactivate() {
|
|
77
|
+
if (serverProcess) {
|
|
78
|
+
console.log('Stopping Hono server...');
|
|
79
|
+
serverProcess.kill();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
class NexusFlowSidebarProvider implements vscode.WebviewViewProvider {
|
|
84
|
+
public static readonly viewType = 'nexusflow.dashboardView';
|
|
85
|
+
private _view?: vscode.WebviewView;
|
|
86
|
+
|
|
87
|
+
constructor(
|
|
88
|
+
private readonly _extensionUri: vscode.Uri,
|
|
89
|
+
) { }
|
|
90
|
+
|
|
91
|
+
public resolveWebviewView(
|
|
92
|
+
webviewView: vscode.WebviewView,
|
|
93
|
+
context: vscode.WebviewViewResolveContext,
|
|
94
|
+
_token: vscode.CancellationToken,
|
|
95
|
+
) {
|
|
96
|
+
this._view = webviewView;
|
|
97
|
+
|
|
98
|
+
webviewView.webview.options = {
|
|
99
|
+
enableScripts: true,
|
|
100
|
+
localResourceRoots: [
|
|
101
|
+
this._extensionUri
|
|
102
|
+
]
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
webviewView.webview.html = this._getHtmlForWebview(webviewView.webview);
|
|
106
|
+
|
|
107
|
+
webviewView.webview.onDidReceiveMessage(data => {
|
|
108
|
+
switch (data.type) {
|
|
109
|
+
case 'openWorkspaceFolder': {
|
|
110
|
+
const uri = vscode.Uri.file(data.workspacePath);
|
|
111
|
+
vscode.commands.executeCommand('vscode.openFolder', uri, false);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case 'executeTerminalCommand': {
|
|
115
|
+
let terminal = vscode.window.terminals.find(t => t.name === "NexusFlow Runner");
|
|
116
|
+
if (!terminal) {
|
|
117
|
+
terminal = vscode.window.createTerminal({
|
|
118
|
+
name: "NexusFlow Runner",
|
|
119
|
+
cwd: data.cwd
|
|
120
|
+
});
|
|
121
|
+
} else {
|
|
122
|
+
// send Ctrl+C to cancel any active operations
|
|
123
|
+
terminal.sendText('\u0003', true);
|
|
124
|
+
}
|
|
125
|
+
terminal.show(true);
|
|
126
|
+
terminal.sendText(data.command);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private _getHtmlForWebview(webview: vscode.Webview) {
|
|
134
|
+
return `<!DOCTYPE html>
|
|
135
|
+
<html lang="en">
|
|
136
|
+
<head>
|
|
137
|
+
<meta charset="UTF-8">
|
|
138
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
139
|
+
<title>NexusFlow Dashboard</title>
|
|
140
|
+
<style>
|
|
141
|
+
html, body {
|
|
142
|
+
margin: 0;
|
|
143
|
+
padding: 0;
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
background-color: var(--vscode-sideBar-background, #0b0f19);
|
|
148
|
+
}
|
|
149
|
+
iframe {
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
border: none;
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
155
|
+
</head>
|
|
156
|
+
<body>
|
|
157
|
+
<iframe src="http://localhost:3000?env=vscode"></iframe>
|
|
158
|
+
<script>
|
|
159
|
+
const vscode = acquireVsCodeApi();
|
|
160
|
+
window.addEventListener('message', event => {
|
|
161
|
+
// Forward messages from iframe to VS Code extension
|
|
162
|
+
vscode.postMessage(event.data);
|
|
163
|
+
});
|
|
164
|
+
</script>
|
|
165
|
+
</body>
|
|
166
|
+
</html>`;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"outDir": "dist",
|
|
6
|
+
"lib": [
|
|
7
|
+
"ES2022"
|
|
8
|
+
],
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"esModuleInterop": true
|
|
14
|
+
},
|
|
15
|
+
"exclude": [
|
|
16
|
+
"node_modules",
|
|
17
|
+
".vscode-test"
|
|
18
|
+
]
|
|
19
|
+
}
|