vibecodingmachine-core 2026.3.9-907 → 2026.3.10-1547

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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/auth/access-denied.html +119 -119
  3. package/src/auth/shared-auth-storage.js +267 -267
  4. package/src/autonomous-mode/feature-implementer.cjs +70 -70
  5. package/src/autonomous-mode/feature-implementer.js +425 -425
  6. package/src/beta-request.js +160 -160
  7. package/src/chat-management/chat-manager.cjs +71 -71
  8. package/src/chat-management/chat-manager.js +342 -342
  9. package/src/compliance/compliance-prompt.js +183 -183
  10. package/src/ide-integration/aider-cli-manager.cjs +850 -850
  11. package/src/ide-integration/applescript-manager.cjs +3215 -3215
  12. package/src/ide-integration/applescript-utils.js +314 -314
  13. package/src/ide-integration/cdp-manager.cjs +221 -221
  14. package/src/ide-integration/claude-code-cli-manager.cjs +456 -456
  15. package/src/ide-integration/cline-cli-manager.cjs +2252 -2252
  16. package/src/ide-integration/continue-cli-manager.js +431 -431
  17. package/src/ide-integration/provider-manager.cjs +595 -595
  18. package/src/ide-integration/quota-detector.cjs +399 -399
  19. package/src/ide-integration/windows-automation-manager.js +532 -4
  20. package/src/ide-integration/windows-ide-manager.js +12 -3
  21. package/src/index.cjs +142 -142
  22. package/src/llm/direct-llm-manager.cjs +1299 -1299
  23. package/src/localization/index.js +147 -147
  24. package/src/quota-management/index.js +108 -108
  25. package/src/requirement-numbering.js +164 -164
  26. package/src/sync/aws-setup.js +445 -445
  27. package/src/ui/ButtonComponents.js +247 -247
  28. package/src/ui/ChatInterface.js +499 -499
  29. package/src/ui/StateManager.js +259 -259
  30. package/src/utils/audit-logger.cjs +116 -116
  31. package/src/utils/config-helpers.cjs +94 -94
  32. package/src/utils/config-helpers.js +94 -94
  33. package/src/utils/env-helpers.js +54 -54
  34. package/src/utils/error-reporter.js +117 -117
  35. package/src/utils/gcloud-auth.cjs +394 -394
  36. package/src/utils/git-branch-manager.js +278 -278
  37. package/src/utils/logger.cjs +193 -193
  38. package/src/utils/logger.js +191 -191
  39. package/src/utils/repo-helpers.cjs +120 -120
  40. package/src/utils/repo-helpers.js +120 -120
  41. package/src/utils/update-checker.js +246 -246
  42. package/src/utils/version-checker.js +170 -170
@@ -1,314 +1,314 @@
1
- /**
2
- * Shared AppleScript utilities for IDE integration
3
- * Consolidates common AppleScript patterns to follow DRY principles
4
- */
5
-
6
- class AppleScriptUtils {
7
- constructor() {
8
- this.logger = console;
9
- }
10
-
11
- /**
12
- * Generate AppleScript for focusing AI panel with multiple fallback strategies
13
- * @param {string} text - The text to send to the AI panel
14
- * @param {string} ide - The IDE name (e.g., 'cursor')
15
- * @returns {string} Complete AppleScript code
16
- */
17
- generateAIPanelFocusScript(text, ide = 'cursor') {
18
- const escapedText = text.replace(/"/g, '\\"');
19
-
20
- return `
21
- tell application "System Events"
22
- tell process "${ide}"
23
- -- Check if the process is running before attempting to interact
24
- try
25
- set frontmost to true
26
- delay 1
27
-
28
- -- PRE-CHECK: Ensure we're not in an editor
29
- try
30
- -- Press Escape to ensure we're not in any input mode
31
- key code 53 -- Escape
32
- delay 0.5
33
- on error
34
- -- Continue if escape fails
35
- end try
36
-
37
- ${this.generateFocusStrategies(escapedText)}
38
- on error
39
- -- Process not running or not accessible
40
- error "Process '${ide}' is not running or not accessible. VibeCodingMachine does not open IDEs - please open ${ide} manually first."
41
- end try
42
- end tell
43
- end tell`;
44
- }
45
-
46
- /**
47
- * Generate multiple focus strategies with fallbacks
48
- * @param {string} escapedText - The escaped text to send
49
- * @returns {string} AppleScript focus strategies
50
- */
51
- generateFocusStrategies(escapedText) {
52
- return `
53
- -- STRATEGY 1: Direct AI Panel Focus via Keyboard Shortcut (Cmd+L) - Primary
54
- try
55
- -- Use Cmd+L to focus AI panel (faster and more reliable)
56
- key code 37 using {command down} -- Cmd+L
57
- delay 2.0
58
-
59
- -- Open new chat session with Cmd+T to prevent crashes
60
- key code 17 using {command down} -- Cmd+T
61
- delay 3.0
62
-
63
- -- Skip clearing text to avoid selecting file content
64
- -- The chat input should be empty when opening new chat session
65
-
66
- -- Wait additional time for chat input field to be fully ready
67
- delay 1.5
68
-
69
- -- Type the message
70
- keystroke "${escapedText}"
71
- delay 2.0
72
-
73
- -- Send with Cmd+Enter (standard for chat interfaces)
74
- key code 36 using {command down}
75
- delay 0.5
76
-
77
- -- Fallback: Press Enter to ensure submission
78
- key code 36
79
- delay 0.5
80
-
81
- -- Additional fallback: Press Enter again to be absolutely sure
82
- key code 36
83
- delay 1.0
84
-
85
- return "Message sent via AppleScript to AI Panel using Cmd+L shortcut with new chat session (Cmd+T)"
86
- on error
87
- -- STRATEGY 2: Command Palette Approach (Fallback 1) - NO AI PANEL TOGGLE
88
- try
89
- -- Step 1: Press Escape first to ensure we're starting clean
90
- key code 53 -- Escape
91
- delay 0.5
92
-
93
- -- Step 2: Open Command Palette (Cmd+Shift+P)
94
- key code 35 using {command down, shift down} -- Cmd+Shift+P
95
- delay 1.0
96
-
97
- -- Step 3: Type "View: Focus into Secondary Side Bar" to focus AI panel
98
- keystroke "View: Focus into Secondary Side Bar"
99
- delay 1.0
100
-
101
- -- Step 4: Press Enter to execute the command
102
- key code 36 -- Enter
103
- delay 2.5
104
-
105
- -- Step 5: CRITICAL - Press Escape to close command palette
106
- key code 53 -- Escape
107
- delay 0.5
108
-
109
- -- Step 6: Open new chat session with Cmd+T to prevent crashes
110
- key code 17 using {command down} -- Cmd+T
111
- delay 3.0
112
-
113
- -- Step 7: Skip clearing text to avoid selecting file content
114
- -- The chat input should be empty when opening new chat session
115
-
116
- -- Step 8: Wait additional time for chat input field to be fully ready
117
- delay 1.5
118
-
119
- -- Step 9: Type the message
120
- keystroke "${escapedText}"
121
- delay 2.0
122
-
123
- -- Step 10: Send with Cmd+Enter (standard for chat interfaces)
124
- key code 36 using {command down}
125
- delay 0.5
126
-
127
- -- Fallback: Press Enter to ensure submission
128
- key code 36
129
- delay 0.5
130
-
131
- -- Additional fallback: Press Enter again to be absolutely sure
132
- key code 36
133
- delay 1.0
134
-
135
- return "Message sent via AppleScript to AI Panel using command palette fallback with new chat session (Cmd+T)"
136
- on error
137
- -- STRATEGY 3: Direct Element Targeting (Last Resort)
138
- try
139
- -- Look for AI panel elements and click them
140
- set aiPanelFound to false
141
-
142
- -- Try to find text fields that might be chat inputs
143
- set allTextFields to text field of window 1
144
- repeat with textField in allTextFields
145
- try
146
- -- Click on the text field (likely chat input)
147
- click textField
148
- delay 0.5
149
-
150
- -- Open new chat session with Cmd+T to prevent crashes
151
- key code 17 using {command down} -- Cmd+T
152
- delay 2.5
153
-
154
- -- Skip clearing text to avoid selecting file content
155
- -- The chat input should be empty when opening new chat session
156
-
157
- -- Wait additional time for chat input field to be fully ready
158
- delay 1.0
159
-
160
- -- Type the message
161
- keystroke "${escapedText}"
162
- delay 1.5
163
-
164
- -- Send with Cmd+Enter
165
- key code 36 using {command down}
166
- delay 0.5
167
-
168
- -- Fallback: Press Enter to ensure submission
169
- key code 36
170
- delay 0.5
171
-
172
- -- Additional fallback: Press Enter again to be absolutely sure
173
- key code 36
174
- delay 1.0
175
-
176
- set aiPanelFound to true
177
- exit repeat
178
- on error
179
- -- Continue to next text field
180
- end try
181
- end repeat
182
-
183
- if aiPanelFound then
184
- return "Message sent via AppleScript to AI Panel using direct element targeting"
185
- end if
186
- on error
187
- -- STRATEGY 4: Emergency fallback - ensure we're not in editor
188
- try
189
- -- First escape any terminal focus
190
- key code 53 -- Escape key
191
- delay 1
192
-
193
- -- Click in editor area to escape terminal
194
- do shell script "/usr/local/bin/cliclick c:400,300"
195
- delay 1
196
-
197
- -- Try Tab navigation to find chat input
198
- repeat 3 times
199
- key code 48 -- Tab key
200
- delay 0.5
201
- end repeat
202
-
203
- -- Open new chat session with Cmd+T to prevent crashes
204
- key code 17 using {command down} -- Cmd+T
205
- delay 2.5
206
-
207
- -- Wait additional time for chat input field to be fully ready
208
- delay 1.0
209
-
210
- -- Type the message
211
- keystroke "${escapedText}"
212
- delay 1.5
213
-
214
- -- Send with Cmd+Enter
215
- key code 36 using {command down}
216
- delay 0.5
217
-
218
- -- Fallback: Press Enter to ensure submission
219
- key code 36
220
- delay 0.5
221
-
222
- -- Additional fallback: Press Enter again to be absolutely sure
223
- key code 36
224
- delay 1.0
225
-
226
- return "Message sent via AppleScript to AI Panel using emergency fallback with new chat session (Cmd+T)"
227
- on error
228
- return "ERROR: All AI panel focus strategies failed"
229
- end try
230
- end try
231
- end try
232
- end try`;
233
- }
234
-
235
- /**
236
- * Generate Windows PowerShell script for AI panel focus
237
- * @param {string} text - The text to send to the AI panel
238
- * @returns {string} Complete PowerShell script
239
- */
240
- generateWindowsAIPanelScript(text) {
241
- const escapedText = text.replace(/"/g, '""');
242
-
243
- return `
244
- # Windows AI Panel Focus Script - Consolidated
245
- Add-Type -AssemblyName System.Windows.Forms
246
- Add-Type -AssemblyName System.Drawing
247
-
248
- # Function to find Cursor window
249
- function Find-CursorWindow {
250
- $processes = Get-Process | Where-Object { $_.ProcessName -like "*cursor*" -or $_.MainWindowTitle -like "*cursor*" }
251
- foreach ($proc in $processes) {
252
- if ($proc.MainWindowHandle -ne [IntPtr]::Zero) {
253
- return $proc
254
- }
255
- }
256
- return $null
257
- }
258
-
259
- # Function to focus AI Panel and send text
260
- function Send-ToAIPanel {
261
- param($windowHandle, $text)
262
-
263
- # Focus the Cursor window
264
- [Microsoft.VisualBasic.Interaction]::AppActivate($windowHandle)
265
- Start-Sleep -Milliseconds 500
266
-
267
- # Step 1: Try Cmd+L equivalent (Ctrl+L on Windows) to focus AI panel
268
- [System.Windows.Forms.SendKeys]::SendWait("^l")
269
- Start-Sleep -Milliseconds 1500
270
-
271
- # Step 2: Open new chat session with Ctrl+T to prevent crashes
272
- [System.Windows.Forms.SendKeys]::SendWait("^t")
273
- Start-Sleep -Milliseconds 1000
274
-
275
- # Step 3: Clear any existing text in the chat input (Ctrl+A, Delete)
276
- [System.Windows.Forms.SendKeys]::SendWait("^a")
277
- Start-Sleep -Milliseconds 200
278
- [System.Windows.Forms.SendKeys]::SendWait("{DELETE}")
279
- Start-Sleep -Milliseconds 200
280
-
281
- # Step 4: Type the message
282
- [System.Windows.Forms.SendKeys]::SendWait("$text")
283
- Start-Sleep -Milliseconds 500
284
-
285
- # Step 5: Send with Ctrl+Enter (standard for chat interfaces)
286
- [System.Windows.Forms.SendKeys]::SendWait("^{ENTER}")
287
- Start-Sleep -Milliseconds 1000
288
- }
289
-
290
- try {
291
- # Find Cursor window
292
- $cursorProcess = Find-CursorWindow
293
- if ($cursorProcess -eq $null) {
294
- Write-Output "ERROR: Cursor window not found"
295
- exit 1
296
- }
297
-
298
- Write-Output "Found Cursor process: $($cursorProcess.ProcessName) (PID: $($cursorProcess.Id))"
299
-
300
- # Send the text to AI Panel
301
- Send-ToAIPanel -windowHandle $cursorProcess.MainWindowHandle -text "${escapedText}"
302
-
303
- Write-Output "SUCCESS: Message sent to Cursor AI Panel using Ctrl+L shortcut with new chat session (Ctrl+T)"
304
- exit 0
305
-
306
- } catch {
307
- Write-Output "ERROR: $($_.Exception.Message)"
308
- exit 1
309
- }`;
310
- }
311
- }
312
-
313
- module.exports = AppleScriptUtils;
314
-
1
+ /**
2
+ * Shared AppleScript utilities for IDE integration
3
+ * Consolidates common AppleScript patterns to follow DRY principles
4
+ */
5
+
6
+ class AppleScriptUtils {
7
+ constructor() {
8
+ this.logger = console;
9
+ }
10
+
11
+ /**
12
+ * Generate AppleScript for focusing AI panel with multiple fallback strategies
13
+ * @param {string} text - The text to send to the AI panel
14
+ * @param {string} ide - The IDE name (e.g., 'cursor')
15
+ * @returns {string} Complete AppleScript code
16
+ */
17
+ generateAIPanelFocusScript(text, ide = 'cursor') {
18
+ const escapedText = text.replace(/"/g, '\\"');
19
+
20
+ return `
21
+ tell application "System Events"
22
+ tell process "${ide}"
23
+ -- Check if the process is running before attempting to interact
24
+ try
25
+ set frontmost to true
26
+ delay 1
27
+
28
+ -- PRE-CHECK: Ensure we're not in an editor
29
+ try
30
+ -- Press Escape to ensure we're not in any input mode
31
+ key code 53 -- Escape
32
+ delay 0.5
33
+ on error
34
+ -- Continue if escape fails
35
+ end try
36
+
37
+ ${this.generateFocusStrategies(escapedText)}
38
+ on error
39
+ -- Process not running or not accessible
40
+ error "Process '${ide}' is not running or not accessible. VibeCodingMachine does not open IDEs - please open ${ide} manually first."
41
+ end try
42
+ end tell
43
+ end tell`;
44
+ }
45
+
46
+ /**
47
+ * Generate multiple focus strategies with fallbacks
48
+ * @param {string} escapedText - The escaped text to send
49
+ * @returns {string} AppleScript focus strategies
50
+ */
51
+ generateFocusStrategies(escapedText) {
52
+ return `
53
+ -- STRATEGY 1: Direct AI Panel Focus via Keyboard Shortcut (Cmd+L) - Primary
54
+ try
55
+ -- Use Cmd+L to focus AI panel (faster and more reliable)
56
+ key code 37 using {command down} -- Cmd+L
57
+ delay 2.0
58
+
59
+ -- Open new chat session with Cmd+T to prevent crashes
60
+ key code 17 using {command down} -- Cmd+T
61
+ delay 3.0
62
+
63
+ -- Skip clearing text to avoid selecting file content
64
+ -- The chat input should be empty when opening new chat session
65
+
66
+ -- Wait additional time for chat input field to be fully ready
67
+ delay 1.5
68
+
69
+ -- Type the message
70
+ keystroke "${escapedText}"
71
+ delay 2.0
72
+
73
+ -- Send with Cmd+Enter (standard for chat interfaces)
74
+ key code 36 using {command down}
75
+ delay 0.5
76
+
77
+ -- Fallback: Press Enter to ensure submission
78
+ key code 36
79
+ delay 0.5
80
+
81
+ -- Additional fallback: Press Enter again to be absolutely sure
82
+ key code 36
83
+ delay 1.0
84
+
85
+ return "Message sent via AppleScript to AI Panel using Cmd+L shortcut with new chat session (Cmd+T)"
86
+ on error
87
+ -- STRATEGY 2: Command Palette Approach (Fallback 1) - NO AI PANEL TOGGLE
88
+ try
89
+ -- Step 1: Press Escape first to ensure we're starting clean
90
+ key code 53 -- Escape
91
+ delay 0.5
92
+
93
+ -- Step 2: Open Command Palette (Cmd+Shift+P)
94
+ key code 35 using {command down, shift down} -- Cmd+Shift+P
95
+ delay 1.0
96
+
97
+ -- Step 3: Type "View: Focus into Secondary Side Bar" to focus AI panel
98
+ keystroke "View: Focus into Secondary Side Bar"
99
+ delay 1.0
100
+
101
+ -- Step 4: Press Enter to execute the command
102
+ key code 36 -- Enter
103
+ delay 2.5
104
+
105
+ -- Step 5: CRITICAL - Press Escape to close command palette
106
+ key code 53 -- Escape
107
+ delay 0.5
108
+
109
+ -- Step 6: Open new chat session with Cmd+T to prevent crashes
110
+ key code 17 using {command down} -- Cmd+T
111
+ delay 3.0
112
+
113
+ -- Step 7: Skip clearing text to avoid selecting file content
114
+ -- The chat input should be empty when opening new chat session
115
+
116
+ -- Step 8: Wait additional time for chat input field to be fully ready
117
+ delay 1.5
118
+
119
+ -- Step 9: Type the message
120
+ keystroke "${escapedText}"
121
+ delay 2.0
122
+
123
+ -- Step 10: Send with Cmd+Enter (standard for chat interfaces)
124
+ key code 36 using {command down}
125
+ delay 0.5
126
+
127
+ -- Fallback: Press Enter to ensure submission
128
+ key code 36
129
+ delay 0.5
130
+
131
+ -- Additional fallback: Press Enter again to be absolutely sure
132
+ key code 36
133
+ delay 1.0
134
+
135
+ return "Message sent via AppleScript to AI Panel using command palette fallback with new chat session (Cmd+T)"
136
+ on error
137
+ -- STRATEGY 3: Direct Element Targeting (Last Resort)
138
+ try
139
+ -- Look for AI panel elements and click them
140
+ set aiPanelFound to false
141
+
142
+ -- Try to find text fields that might be chat inputs
143
+ set allTextFields to text field of window 1
144
+ repeat with textField in allTextFields
145
+ try
146
+ -- Click on the text field (likely chat input)
147
+ click textField
148
+ delay 0.5
149
+
150
+ -- Open new chat session with Cmd+T to prevent crashes
151
+ key code 17 using {command down} -- Cmd+T
152
+ delay 2.5
153
+
154
+ -- Skip clearing text to avoid selecting file content
155
+ -- The chat input should be empty when opening new chat session
156
+
157
+ -- Wait additional time for chat input field to be fully ready
158
+ delay 1.0
159
+
160
+ -- Type the message
161
+ keystroke "${escapedText}"
162
+ delay 1.5
163
+
164
+ -- Send with Cmd+Enter
165
+ key code 36 using {command down}
166
+ delay 0.5
167
+
168
+ -- Fallback: Press Enter to ensure submission
169
+ key code 36
170
+ delay 0.5
171
+
172
+ -- Additional fallback: Press Enter again to be absolutely sure
173
+ key code 36
174
+ delay 1.0
175
+
176
+ set aiPanelFound to true
177
+ exit repeat
178
+ on error
179
+ -- Continue to next text field
180
+ end try
181
+ end repeat
182
+
183
+ if aiPanelFound then
184
+ return "Message sent via AppleScript to AI Panel using direct element targeting"
185
+ end if
186
+ on error
187
+ -- STRATEGY 4: Emergency fallback - ensure we're not in editor
188
+ try
189
+ -- First escape any terminal focus
190
+ key code 53 -- Escape key
191
+ delay 1
192
+
193
+ -- Click in editor area to escape terminal
194
+ do shell script "/usr/local/bin/cliclick c:400,300"
195
+ delay 1
196
+
197
+ -- Try Tab navigation to find chat input
198
+ repeat 3 times
199
+ key code 48 -- Tab key
200
+ delay 0.5
201
+ end repeat
202
+
203
+ -- Open new chat session with Cmd+T to prevent crashes
204
+ key code 17 using {command down} -- Cmd+T
205
+ delay 2.5
206
+
207
+ -- Wait additional time for chat input field to be fully ready
208
+ delay 1.0
209
+
210
+ -- Type the message
211
+ keystroke "${escapedText}"
212
+ delay 1.5
213
+
214
+ -- Send with Cmd+Enter
215
+ key code 36 using {command down}
216
+ delay 0.5
217
+
218
+ -- Fallback: Press Enter to ensure submission
219
+ key code 36
220
+ delay 0.5
221
+
222
+ -- Additional fallback: Press Enter again to be absolutely sure
223
+ key code 36
224
+ delay 1.0
225
+
226
+ return "Message sent via AppleScript to AI Panel using emergency fallback with new chat session (Cmd+T)"
227
+ on error
228
+ return "ERROR: All AI panel focus strategies failed"
229
+ end try
230
+ end try
231
+ end try
232
+ end try`;
233
+ }
234
+
235
+ /**
236
+ * Generate Windows PowerShell script for AI panel focus
237
+ * @param {string} text - The text to send to the AI panel
238
+ * @returns {string} Complete PowerShell script
239
+ */
240
+ generateWindowsAIPanelScript(text) {
241
+ const escapedText = text.replace(/"/g, '""');
242
+
243
+ return `
244
+ # Windows AI Panel Focus Script - Consolidated
245
+ Add-Type -AssemblyName System.Windows.Forms
246
+ Add-Type -AssemblyName System.Drawing
247
+
248
+ # Function to find Cursor window
249
+ function Find-CursorWindow {
250
+ $processes = Get-Process | Where-Object { $_.ProcessName -like "*cursor*" -or $_.MainWindowTitle -like "*cursor*" }
251
+ foreach ($proc in $processes) {
252
+ if ($proc.MainWindowHandle -ne [IntPtr]::Zero) {
253
+ return $proc
254
+ }
255
+ }
256
+ return $null
257
+ }
258
+
259
+ # Function to focus AI Panel and send text
260
+ function Send-ToAIPanel {
261
+ param($windowHandle, $text)
262
+
263
+ # Focus the Cursor window
264
+ [Microsoft.VisualBasic.Interaction]::AppActivate($windowHandle)
265
+ Start-Sleep -Milliseconds 500
266
+
267
+ # Step 1: Try Cmd+L equivalent (Ctrl+L on Windows) to focus AI panel
268
+ [System.Windows.Forms.SendKeys]::SendWait("^l")
269
+ Start-Sleep -Milliseconds 1500
270
+
271
+ # Step 2: Open new chat session with Ctrl+T to prevent crashes
272
+ [System.Windows.Forms.SendKeys]::SendWait("^t")
273
+ Start-Sleep -Milliseconds 1000
274
+
275
+ # Step 3: Clear any existing text in the chat input (Ctrl+A, Delete)
276
+ [System.Windows.Forms.SendKeys]::SendWait("^a")
277
+ Start-Sleep -Milliseconds 200
278
+ [System.Windows.Forms.SendKeys]::SendWait("{DELETE}")
279
+ Start-Sleep -Milliseconds 200
280
+
281
+ # Step 4: Type the message
282
+ [System.Windows.Forms.SendKeys]::SendWait("$text")
283
+ Start-Sleep -Milliseconds 500
284
+
285
+ # Step 5: Send with Ctrl+Enter (standard for chat interfaces)
286
+ [System.Windows.Forms.SendKeys]::SendWait("^{ENTER}")
287
+ Start-Sleep -Milliseconds 1000
288
+ }
289
+
290
+ try {
291
+ # Find Cursor window
292
+ $cursorProcess = Find-CursorWindow
293
+ if ($cursorProcess -eq $null) {
294
+ Write-Output "ERROR: Cursor window not found"
295
+ exit 1
296
+ }
297
+
298
+ Write-Output "Found Cursor process: $($cursorProcess.ProcessName) (PID: $($cursorProcess.Id))"
299
+
300
+ # Send the text to AI Panel
301
+ Send-ToAIPanel -windowHandle $cursorProcess.MainWindowHandle -text "${escapedText}"
302
+
303
+ Write-Output "SUCCESS: Message sent to Cursor AI Panel using Ctrl+L shortcut with new chat session (Ctrl+T)"
304
+ exit 0
305
+
306
+ } catch {
307
+ Write-Output "ERROR: $($_.Exception.Message)"
308
+ exit 1
309
+ }`;
310
+ }
311
+ }
312
+
313
+ module.exports = AppleScriptUtils;
314
+