vibecodingmachine-core 1.0.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/.babelrc +13 -0
- package/README.md +28 -0
- package/__tests__/applescript-manager-claude-fix.test.js +286 -0
- package/__tests__/requirement-2-auto-start-looping.test.js +69 -0
- package/__tests__/requirement-3-auto-start-looping.test.js +69 -0
- package/__tests__/requirement-4-auto-start-looping.test.js +69 -0
- package/__tests__/requirement-6-auto-start-looping.test.js +73 -0
- package/__tests__/requirement-7-status-tracking.test.js +332 -0
- package/jest.config.js +18 -0
- package/jest.setup.js +12 -0
- package/package.json +46 -0
- package/src/auth/access-denied.html +119 -0
- package/src/auth/shared-auth-storage.js +230 -0
- package/src/autonomous-mode/feature-implementer.cjs +70 -0
- package/src/autonomous-mode/feature-implementer.js +425 -0
- package/src/chat-management/chat-manager.cjs +71 -0
- package/src/chat-management/chat-manager.js +342 -0
- package/src/ide-integration/__tests__/applescript-manager-thread-closure.test.js +227 -0
- package/src/ide-integration/aider-cli-manager.cjs +850 -0
- package/src/ide-integration/applescript-diagnostics.js +0 -0
- package/src/ide-integration/applescript-manager.cjs +1088 -0
- package/src/ide-integration/applescript-manager.js +2803 -0
- package/src/ide-integration/applescript-open-apps.js +0 -0
- package/src/ide-integration/applescript-read-response.js +0 -0
- package/src/ide-integration/applescript-send-text.js +0 -0
- package/src/ide-integration/applescript-thread-closure.js +0 -0
- package/src/ide-integration/applescript-utils.js +306 -0
- package/src/ide-integration/cdp-manager.cjs +221 -0
- package/src/ide-integration/cdp-manager.js +321 -0
- package/src/ide-integration/claude-code-cli-manager.cjs +301 -0
- package/src/ide-integration/cline-cli-manager.cjs +2252 -0
- package/src/ide-integration/continue-cli-manager.js +431 -0
- package/src/ide-integration/provider-manager.cjs +354 -0
- package/src/ide-integration/quota-detector.cjs +34 -0
- package/src/ide-integration/quota-detector.js +349 -0
- package/src/ide-integration/windows-automation-manager.js +262 -0
- package/src/index.cjs +43 -0
- package/src/index.js +17 -0
- package/src/llm/direct-llm-manager.cjs +609 -0
- package/src/ui/ButtonComponents.js +247 -0
- package/src/ui/ChatInterface.js +499 -0
- package/src/ui/StateManager.js +259 -0
- package/src/ui/StateManager.test.js +0 -0
- package/src/utils/audit-logger.cjs +116 -0
- package/src/utils/config-helpers.cjs +94 -0
- package/src/utils/config-helpers.js +94 -0
- package/src/utils/electron-update-checker.js +78 -0
- package/src/utils/gcloud-auth.cjs +394 -0
- package/src/utils/logger.cjs +193 -0
- package/src/utils/logger.js +191 -0
- package/src/utils/repo-helpers.cjs +120 -0
- package/src/utils/repo-helpers.js +120 -0
- package/src/utils/requirement-helpers.js +432 -0
- package/src/utils/update-checker.js +167 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared UI Button Components
|
|
3
|
+
* Used by both electron app and VSCode extension
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Button component for autonomous mode
|
|
7
|
+
export function createAutonomousButton({
|
|
8
|
+
autonomousMode = false,
|
|
9
|
+
isPaused = false,
|
|
10
|
+
onClick,
|
|
11
|
+
className = '',
|
|
12
|
+
style = {}
|
|
13
|
+
}) {
|
|
14
|
+
const button = document.createElement('button');
|
|
15
|
+
button.className = `autonomous-button ${autonomousMode ? 'active' : ''} ${className}`;
|
|
16
|
+
button.textContent = autonomousMode ? '🤖 Stop Auto' : '🤖 Start Auto';
|
|
17
|
+
button.disabled = isPaused;
|
|
18
|
+
button.title = autonomousMode ? 'Stop autonomous development' : 'Start autonomous feature implementation';
|
|
19
|
+
|
|
20
|
+
// Apply shared styles
|
|
21
|
+
Object.assign(button.style, {
|
|
22
|
+
padding: '8px 16px',
|
|
23
|
+
backgroundColor: autonomousMode ? '#d83b01' : '#68217a',
|
|
24
|
+
color: 'white',
|
|
25
|
+
border: 'none',
|
|
26
|
+
borderRadius: '6px',
|
|
27
|
+
fontSize: '14px',
|
|
28
|
+
cursor: isPaused ? 'not-allowed' : 'pointer',
|
|
29
|
+
transition: 'all 0.2s',
|
|
30
|
+
fontWeight: '500',
|
|
31
|
+
...style
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
button.addEventListener('click', onClick);
|
|
35
|
+
return button;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Button component for pause/resume
|
|
39
|
+
export function createPauseButton({
|
|
40
|
+
isPaused = false,
|
|
41
|
+
onClick,
|
|
42
|
+
className = '',
|
|
43
|
+
style = {}
|
|
44
|
+
}) {
|
|
45
|
+
const button = document.createElement('button');
|
|
46
|
+
button.className = `pause-button ${isPaused ? 'paused' : ''} ${className}`;
|
|
47
|
+
button.textContent = isPaused ? '▶️ Resume' : '⏸️ Pause (Esc)';
|
|
48
|
+
button.title = isPaused ? 'Resume autonomous development' : 'Pause autonomous development (Esc)';
|
|
49
|
+
|
|
50
|
+
// Apply shared styles
|
|
51
|
+
Object.assign(button.style, {
|
|
52
|
+
padding: '8px 16px',
|
|
53
|
+
backgroundColor: isPaused ? '#28a745' : '#ffc107',
|
|
54
|
+
color: isPaused ? 'white' : '#000',
|
|
55
|
+
border: 'none',
|
|
56
|
+
borderRadius: '6px',
|
|
57
|
+
fontSize: '14px',
|
|
58
|
+
cursor: 'pointer',
|
|
59
|
+
transition: 'all 0.2s',
|
|
60
|
+
...style
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
button.addEventListener('click', onClick);
|
|
64
|
+
return button;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Button component for stop
|
|
68
|
+
export function createStopButton({
|
|
69
|
+
autonomousMode = false,
|
|
70
|
+
onClick,
|
|
71
|
+
className = '',
|
|
72
|
+
style = {}
|
|
73
|
+
}) {
|
|
74
|
+
const button = document.createElement('button');
|
|
75
|
+
button.className = `stop-button ${className}`;
|
|
76
|
+
button.textContent = '🛑 Stop';
|
|
77
|
+
button.disabled = !autonomousMode;
|
|
78
|
+
button.title = 'Stop autonomous development completely';
|
|
79
|
+
|
|
80
|
+
// Apply shared styles
|
|
81
|
+
Object.assign(button.style, {
|
|
82
|
+
padding: '8px 16px',
|
|
83
|
+
backgroundColor: autonomousMode ? '#dc3545' : '#6c757d',
|
|
84
|
+
color: 'white',
|
|
85
|
+
border: 'none',
|
|
86
|
+
borderRadius: '6px',
|
|
87
|
+
fontSize: '14px',
|
|
88
|
+
cursor: autonomousMode ? 'pointer' : 'not-allowed',
|
|
89
|
+
transition: 'all 0.2s',
|
|
90
|
+
...style
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
button.addEventListener('click', onClick);
|
|
94
|
+
return button;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Button component for check quota
|
|
98
|
+
export function createCheckQuotaButton({
|
|
99
|
+
isCheckingQuota = false,
|
|
100
|
+
onClick,
|
|
101
|
+
className = '',
|
|
102
|
+
style = {}
|
|
103
|
+
}) {
|
|
104
|
+
const button = document.createElement('button');
|
|
105
|
+
button.className = `check-quota-button ${className}`;
|
|
106
|
+
button.textContent = isCheckingQuota ? 'Checking...' : '🔍 Check Quota';
|
|
107
|
+
button.disabled = isCheckingQuota;
|
|
108
|
+
button.title = 'Check for quota warnings and switch to available IDE';
|
|
109
|
+
|
|
110
|
+
// Apply shared styles
|
|
111
|
+
Object.assign(button.style, {
|
|
112
|
+
padding: '8px 16px',
|
|
113
|
+
backgroundColor: isCheckingQuota ? '#6c757d' : '#17a2b8',
|
|
114
|
+
color: 'white',
|
|
115
|
+
border: 'none',
|
|
116
|
+
borderRadius: '6px',
|
|
117
|
+
fontSize: '14px',
|
|
118
|
+
cursor: isCheckingQuota ? 'not-allowed' : 'pointer',
|
|
119
|
+
transition: 'all 0.2s',
|
|
120
|
+
...style
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
button.addEventListener('click', onClick);
|
|
124
|
+
return button;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Button component for open IDE
|
|
128
|
+
export function createOpenIdeButton({
|
|
129
|
+
isOpeningIde = false,
|
|
130
|
+
onClick,
|
|
131
|
+
className = '',
|
|
132
|
+
style = {}
|
|
133
|
+
}) {
|
|
134
|
+
const button = document.createElement('button');
|
|
135
|
+
button.className = `open-ide-button ${className}`;
|
|
136
|
+
button.textContent = isOpeningIde ? 'Opening...' : 'Open IDE';
|
|
137
|
+
button.disabled = isOpeningIde;
|
|
138
|
+
button.title = isOpeningIde ? 'Opening IDE...' : 'Open IDE (dev mode)';
|
|
139
|
+
|
|
140
|
+
// Apply shared styles
|
|
141
|
+
Object.assign(button.style, {
|
|
142
|
+
padding: '8px 16px',
|
|
143
|
+
backgroundColor: isOpeningIde ? '#6c757d' : '#28a745',
|
|
144
|
+
color: 'white',
|
|
145
|
+
border: 'none',
|
|
146
|
+
borderRadius: '6px',
|
|
147
|
+
fontSize: '14px',
|
|
148
|
+
cursor: isOpeningIde ? 'not-allowed' : 'pointer',
|
|
149
|
+
transition: 'all 0.2s',
|
|
150
|
+
display: 'flex',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
gap: '8px',
|
|
153
|
+
...style
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
button.addEventListener('click', onClick);
|
|
157
|
+
return button;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// IDE selector button
|
|
161
|
+
export function createIdeButton({
|
|
162
|
+
ide,
|
|
163
|
+
isActive = false,
|
|
164
|
+
onClick,
|
|
165
|
+
className = '',
|
|
166
|
+
style = {}
|
|
167
|
+
}) {
|
|
168
|
+
const button = document.createElement('button');
|
|
169
|
+
button.className = `ide-button ${isActive ? 'active' : ''} ${className}`;
|
|
170
|
+
button.textContent = ide === 'vscode' ? 'VS Code' : ide.charAt(0).toUpperCase() + ide.slice(1);
|
|
171
|
+
button.dataset.ide = ide;
|
|
172
|
+
button.title = `Select ${ide}`;
|
|
173
|
+
|
|
174
|
+
// Apply shared styles
|
|
175
|
+
Object.assign(button.style, {
|
|
176
|
+
padding: '8px 16px',
|
|
177
|
+
backgroundColor: isActive ? '#68217a' : '#007acc',
|
|
178
|
+
color: 'white',
|
|
179
|
+
border: 'none',
|
|
180
|
+
borderRadius: '6px',
|
|
181
|
+
fontSize: '14px',
|
|
182
|
+
cursor: 'pointer',
|
|
183
|
+
transition: 'all 0.2s',
|
|
184
|
+
margin: '0 5px',
|
|
185
|
+
...style
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
button.addEventListener('click', onClick);
|
|
189
|
+
return button;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Container for control buttons
|
|
193
|
+
export function createControlButtonContainer({
|
|
194
|
+
className = '',
|
|
195
|
+
style = {}
|
|
196
|
+
}) {
|
|
197
|
+
const container = document.createElement('div');
|
|
198
|
+
container.className = `control-buttons ${className}`;
|
|
199
|
+
|
|
200
|
+
// Apply shared styles
|
|
201
|
+
Object.assign(container.style, {
|
|
202
|
+
display: 'flex',
|
|
203
|
+
gap: '10px',
|
|
204
|
+
marginTop: '10px',
|
|
205
|
+
flexWrap: 'wrap',
|
|
206
|
+
justifyContent: 'center',
|
|
207
|
+
...style
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
return container;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Update button states
|
|
214
|
+
export function updateAutonomousButton(button, autonomousMode, isPaused) {
|
|
215
|
+
button.textContent = autonomousMode ? '🤖 Stop Auto' : '🤖 Start Auto';
|
|
216
|
+
button.className = `autonomous-button ${autonomousMode ? 'active' : ''}`;
|
|
217
|
+
button.disabled = isPaused;
|
|
218
|
+
button.style.backgroundColor = autonomousMode ? '#d83b01' : '#68217a';
|
|
219
|
+
button.style.cursor = isPaused ? 'not-allowed' : 'pointer';
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function updatePauseButton(button, isPaused) {
|
|
223
|
+
button.textContent = isPaused ? '▶️ Resume' : '⏸️ Pause (Esc)';
|
|
224
|
+
button.className = `pause-button ${isPaused ? 'paused' : ''}`;
|
|
225
|
+
button.style.backgroundColor = isPaused ? '#28a745' : '#ffc107';
|
|
226
|
+
button.style.color = isPaused ? 'white' : '#000';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function updateStopButton(button, autonomousMode) {
|
|
230
|
+
button.disabled = !autonomousMode;
|
|
231
|
+
button.style.backgroundColor = autonomousMode ? '#dc3545' : '#6c757d';
|
|
232
|
+
button.style.cursor = autonomousMode ? 'pointer' : 'not-allowed';
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function updateCheckQuotaButton(button, isCheckingQuota) {
|
|
236
|
+
button.textContent = isCheckingQuota ? 'Checking...' : '🔍 Check Quota';
|
|
237
|
+
button.disabled = isCheckingQuota;
|
|
238
|
+
button.style.backgroundColor = isCheckingQuota ? '#6c757d' : '#17a2b8';
|
|
239
|
+
button.style.cursor = isCheckingQuota ? 'not-allowed' : 'pointer';
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export function updateOpenIdeButton(button, isOpeningIde) {
|
|
243
|
+
button.textContent = isOpeningIde ? 'Opening...' : 'Open IDE';
|
|
244
|
+
button.disabled = isOpeningIde;
|
|
245
|
+
button.style.backgroundColor = isOpeningIde ? '#6c757d' : '#28a745';
|
|
246
|
+
button.style.cursor = isOpeningIde ? 'not-allowed' : 'pointer';
|
|
247
|
+
}
|