Skip to content

Commit 71c30d2

Browse files
grimmerkclaude
andcommitted
perf: use 'name of every window' instead of loop (~4x faster)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6aba6a8 commit 71c30d2

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/vscode-based-ide-utility.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,7 @@ export const detectActiveIDEProjects = async (): Promise<Set<string>> => {
406406

407407
const script = `tell application "System Events"
408408
if exists (process "${processName}") then
409-
tell process "${processName}"
410-
set windowNames to {}
411-
repeat with w in (every window)
412-
set end of windowNames to name of w
413-
end repeat
414-
return windowNames
415-
end tell
409+
return name of every window of process "${processName}"
416410
end if
417411
end tell`;
418412

0 commit comments

Comments
 (0)