@@ -39,8 +39,21 @@ enum BrowserAppDetector {
3939 /// Electron apps (Chromium under the hood) that ship editors worth covering. This is an
4040 /// intentional named allowlist, not a blanket Electron opt-in: most Electron apps are not
4141 /// text-editing surfaces, and priming them wholesale risks unexpected behavior.
42+ ///
43+ /// Entries are lowercased and matched case-insensitively (see `isElectronEditor`). VS Code's real
44+ /// bundle id is the mixed-case `com.microsoft.VSCode`, so an exact match would silently miss it
45+ /// and leave the editor's entire Electron AX tree dormant: no focused field resolves for the
46+ /// editor, the Copilot chat, or the integrated terminal, so no suggestions appear anywhere in the
47+ /// app even though screenshot-based OCR keeps working.
48+ ///
49+ /// Cursor is intentionally absent: it ships under opaque ToDesktop bundle ids
50+ /// (`com.todesktop.<hash>`) that change between builds, so there is no stable id to allowlist
51+ /// here without a broad `com.todesktop.` prefix that would also prime unrelated ToDesktop apps.
4252 private static let electronEditorBundleIdentifiers : Set < String > = [
43- " com.clickup.desktop-app "
53+ " com.clickup.desktop-app " ,
54+ " com.microsoft.vscode " , // Visual Studio Code
55+ " com.microsoft.vscodeinsiders " , // VS Code - Insiders
56+ " com.vscodium " // VSCodium (FOSS VS Code build)
4457 ]
4558
4659 /// Broad check: is the user typing inside any web browser? Used for prompt tone hints.
@@ -53,10 +66,12 @@ enum BrowserAppDetector {
5366 hasMatchingPrefix ( bundleIdentifier, in: chromiumBundlePrefixes)
5467 }
5568
56- /// Is this a named Electron editor we intentionally cover?
69+ /// Is this a named Electron editor we intentionally cover? Case-insensitive because macOS bundle
70+ /// ids are case-insensitive in practice and VS Code's is mixed-case (`com.microsoft.VSCode`); a
71+ /// case-sensitive exact match here was the reason VS Code resolved no focus and got no suggestions.
5772 static func isElectronEditor( bundleIdentifier: String ? ) -> Bool {
58- guard let bundleIdentifier else { return false }
59- return electronEditorBundleIdentifiers. contains ( bundleIdentifier )
73+ guard let lowered = bundleIdentifier? . lowercased ( ) else { return false }
74+ return electronEditorBundleIdentifiers. contains ( lowered )
6075 }
6176
6277 /// Gate for the Chromium/Electron-specific AX recovery paths (renderer priming, cursor
0 commit comments