Automatically accept supported agent approval buttons in Antigravity IDE on Windows. Windows ไธ่ชๅจๆฅๅ Antigravity IDE ๆฏๆ็ Agent ๅฎกๆนๆ้ฎ๏ผๆ ้่ฐ่ฏ็ซฏๅฃๆๅฝไปค็ฝๅๅ้ ็ฝฎใ
Tired of permission popups interrupting your AI workflow? This extension starts automatically in a trusted Antigravity workspace and uses Windows UIAutomation to accept supported
Run,Accept, andAllowbuttons. No CDP port or executable patching is required.ๅๅคไบๆ้ๅผน็ชๆๆญไฝ ็ AI ๅทฅไฝๆต๏ผ ๆไปถๅจๅฏไฟก็ Antigravity ๅทฅไฝๅบ่ชๅจๅฏๅจ๏ผ้่ฟ Windows UIAutomation ๆฅๅๆฏๆ็
RunใAcceptใAllow็ญๅฎกๆนๆ้ฎใๆ ้ CDP ็ซฏๅฃ๏ผไนไธไฟฎๆน IDE ็จๅบใ
Antigravity's IDE settings documentation describes terminal Always Proceed, with denylist exceptions. Native permission features differ by product and platform: Antigravity 2.0 and Antigravity IDE have separate release tracks. If your installed version's native controls meet your needs, they may be sufficient.
ๅฎๆน IDE ่ฎพ็ฝฎๆๆกฃๆไพ็ป็ซฏ Always Proceed๏ผๅ็ๆ้่ฝๅๅ ไบงๅใ็ๆฌๅๅนณๅฐ่ๅผ๏ผไธ่ฝๆ Antigravity 2.0 / CLI ็ Turbo ่ฏดๆ็ดๆฅๅฝๆๆฌๆบ IDE 2.5.5 ๅทฒ้ช่ฏ็่ฎพ็ฝฎใๅฆๆๅฝๅ็ๆฌ็ๅ็่ฎพ็ฝฎๅทฒ็ปๆปก่ถณ้ๆฑ๏ผๅฏไปฅ็ดๆฅไฝฟ็จใ่ฟไธชๆฉๅฑไฟ็็ไปทๅผๆฏๅ ผๅฎนไปๆพ็คบๅฎกๆนๆ้ฎ็ๅทฅไฝๆตๅๆง็ IDE๏ผๆฌๆฌกๅฎๆต็ๆฏ IDE 2.5.5 ็ไธๆฌกๅ ่ฎธๅฎกๆนๅก็ใ
- Installation enables scanning by default; a trusted workspace, local Windows host, and accessible IDE window are required. The extension does not change the IDE's permission settings.
- Strict Mode, explicit denials, enterprise policies, sandbox restrictions, and browser denylist entries remain enforced by Antigravity. This is not a guarantee that every command can execute.
- Workspace trust prompts and generic
Save,OK,Yes, orRetrybuttons are not agent approvals and are excluded. English and Chinese approval labels are supported. - Command permission cards select Yes, allow this time and submit the same card. Browser domain cards select Allow Once, including the menu inside More actions in a narrow sidebar. Command cards in the conversation or input area keep the same strict form checks; long cards scroll only the verified action control into view. The scanner does not select Always Allow or expand historical command records.
- Narrow browser menus wait until the target IDE window is foreground and user input has been idle for 500ms; scanning resumes automatically when these conditions return. Direct Allow Once buttons and other supported approvals retain their background action path.
- ๆต่งๅจ็ช่ๅๅจๅฏนๅบ IDE ็ชๅฃๅคไบๅๅฐใ่พๅ ฅ็ฉบ้ฒ 500ms ๅ่ชๅจๅค็๏ผๅ่ตฐๆๆญฃๅจ่พๅ ฅๆถๆ็ผ๏ผๆ ้ๆๅจ็นๆนๅใๅฎฝๆ Allow Once ๅๅ ถๅฎๆฏๆ็ๅฎกๆน็ปง็ปญไฝฟ็จๅๅฐๅจไฝ่ทฏๅพใ
InvokePatterncan work without moving the cursor. Physical fallback yields to user input and only acts on a revalidated button in the foreground Antigravity window; covered or changed targets are skipped.- One scanner covers the desktop session's Antigravity windows from the same installation path. Other enabled windows wait to take over. Stop disables this window's scanner; another enabled window may continue scanning, including buttons in the stopped window. Workspace trust gates the scanner's host; scanning is not isolated per workspace.
้ป่ฎคๅฎ่ฃ ๅณๅฏๅจๆซๆ๏ผไฝๅๆๆฏๅฏไฟกๅทฅไฝๅบใๆฌๅฐ Windows ๅๅฏ่ฎฟ้ฎ็ IDE ็ชๅฃใโ้ถ้ ็ฝฎโๆๆ ้้ขๅคๆซๆๅจ้ ็ฝฎ๏ผไธไปฃ่กจ็ป่ฟๆๆๆ้ใๆช้ๅฏนๆฏไธช IDE ็ๆฌใ่ฟ็จ็ฏๅขๅๅฎกๆน็ฑปๅ่ฟ่กๅฎๆบ้ช่ฏใ
Current maintenance: fhgffy, with Codex assisting fixes and tests. See CONTRIBUTING.md to help maintain the project. Historical Git commit authorship is preserved.
Window process and cross-architecture verification: docs/verification-2026-10-07-process.md. Latest user-input interference verification: docs/verification-2026-10-07-input.md. Multi-window and CI verification: docs/verification-2026-10-07.md. Earlier runtime notes remain in docs/verification-2026-10-05.md. A result on one IDE version does not establish compatibility with every permission type or future release.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Extension Host (TypeScript) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Spawns PowerShell background process โ โ
โ โ 500ms polling ยท 1500ms cooldown โ โ
โ โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ stdout โ
โ โผ โ
โ Parse ___CLICK_INVOKE___ / ___CLICK_PHYSICAL___โ
โ โ Log to Output Channel โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PowerShell (autoClicker.ps1) โ
โ โ
โ 1. Scan Chrome_WidgetWin_1 windows โ
โ โ Verify the owning Antigravity executable โ
โ โ
โ 2. Find all Button controls (UIAutomation) โ
โ โ Match supported agent approval labels โ
โ in English and Chinese โ
โ โ Exclude: Run and Debug, Run Task, โ
โ Always run, Run Extension, ... โ
โ โ
โ 3. Click via InvokePattern (API-level) โ
โ โ Fallback: user32.dll physical mouse click โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Layer | Mechanism |
|---|---|
| InvokePattern (preferred) | UIAutomation API-level invocation without explicit cursor or focus changes. Provider behavior is checked in runtime verification. |
| Physical Click (fallback) | Requires an idle foreground target, released input keys, and a revalidated button. Sends target movement, press/release and optional cursor restoration in one input batch, after checking screen and clip bounds. |
The extension declares extensionKind: ["ui"], forcing it to always run on your local Windows machine โ even in remote environments.
ๆฌๆไปถๅฃฐๆ extensionKind: ["ui"]๏ผๅง็ปๅจๆฌๅฐ Windows ไพง่ฟ่กใ
| Environment | Status |
|---|---|
| ๐ฅ๏ธ Local Windows | Supported scanner host; see verification notes for tested IDE versions |
| ๐ง Remote - WSL | Local UI extension design; remote end-to-end verification pending |
| ๐ Remote - SSH | Local UI extension design; remote end-to-end verification pending |
| ๐ฆ Remote - Container | Local UI extension design; remote end-to-end verification pending |
- Windows 10/11 โ Uses native
powershell.exeand UIAutomation - No CDP port, no additional setup | ๆ ้ CDP ็ซฏๅฃ๏ผๆ ้้ขๅค้ ็ฝฎ
ๆนๅผไธ๏ผๆไปถๅๅบๆ็ดขๅฎ่ฃ ๏ผๆจ่๏ผ
ๅจ VS Code / Antigravity ็ๆฉๅฑ้ขๆฟ (Ctrl+Shift+X) ไธญๆ็ดข Antigravity Auto Accept๏ผๅผๅ่
: fhgffy๏ผ๏ผ็นๅปๅฎ่ฃ
ๅณๅฏใ
ๆต่งๅจๅฎกๆนไฟฎๅคไฝไบ v5.3.1๏ผไผ่ฏๅค็ป็ซฏๅฎกๆนไธ้ฟ่กจๅๆปๅจไฟฎๅคไฝไบ v5.3.2๏ผ่ฏทๆ ธๅฏนๅๅบๆพ็คบ็็ๆฌใ่ฅๅๅบไปๆพ็คบๆง็ๆฌ๏ผ่ฏทไฝฟ็จ GitHub Release ไธญๅฏนๅบ็ๆฌ็ VSIXใ
ๆนๅผไบ๏ผไธ่ฝฝ VSIX | ๆๅจๅฎ่ฃ ๆญฅ้ชค
-
Download the latest
.vsixfrom the Releases page ไป Releases ้กต้ข ไธ่ฝฝๆๆฐ.vsixๆไปถ -
Install via
Ctrl+Shift+Xโ...โ Install from VSIX... ้่ฟๆฉๅฑ้ขๆฟ โ...โ ไป VSIX ๅฎ่ฃ ... -
Run Developer: Reload Window or restart the IDE | ๆง่ก Developer: Reload Window ๆ้ๅฏ IDE
๐ก Automatic startup โ Scanning starts automatically in a trusted Antigravity workspace. Windows permission and workspace trust choices remain yours. ่ชๅจๅฏๅจ โ ๅจๅฏไฟก Antigravity ๅทฅไฝๅบ่ชๅจๆซๆ๏ผ็ณป็ปๆ้ไธๅทฅไฝๅบไฟกไปปไป็ฑ็จๆทๅณๅฎใ
Press Ctrl+Shift+P and type:
Start Antigravity Auto Acceptโ ๅผๅฏStop Antigravity Auto Acceptโ ๅ ณ้ญToggle Antigravity Auto Accept ON/OFFโ ๅๆขRestart Antigravity Auto Accept Scannerโ ้ๅฏๅๅฐๆซๆๅจShow Antigravity Auto Accept Logsโ ๆๅผ่พๅบๆฅๅฟ
The defaults still work with zero configuration. Advanced users can tune these in Settings:
้ป่ฎคไป็ถๆฏ้ถ้ ็ฝฎๅณ็จใ้่ฆๅพฎ่ฐๆถ๏ผๅฏไปฅๅจ่ฎพ็ฝฎ้ไฟฎๆน๏ผ
| Setting | Default | Purpose |
|---|---|---|
antigravityAutoAccept.autoStart |
true |
Start scanning automatically when the extension activates |
antigravityAutoAccept.pollMs |
500 |
UIAutomation scan interval |
antigravityAutoAccept.cooldownMs |
1500 |
Minimum delay after an approval action attempt |
antigravityAutoAccept.restoreCursor |
true |
Include cursor restoration in the verified fallback input batch |
antigravityAutoAccept.showNotifications |
false |
Show start/stop/restart notifications |
- Skip unrelated button state and geometry queries after the existing name filter; preserve action-time host, input and approval checks.
- Add production-loop regressions for ordinary buttons with throwing getters and disabled, offscreen, invalid-geometry and valid approval candidates.
- Publish verified main CI packages to GitHub Releases after tests pass. Marketplace and Open VSX publishing use configured credentials and report missing credentials explicitly.
- See publishing instructions for release retry and store verification.
- Query the current window's process image directly, avoiding repeated system-wide process enumeration.
- Recognize 64-bit IDE hosts from a 32-bit scanner and recheck the full installation path before each approval action.
- Reject exited processes on the same native handle; close query handles after success, failure or exceptions.
- Add real process-path and controlled failure regressions to PS5 x64/x86 and PS7 x64 CI.
- Yield physical fallback to active typing, dragging, held keys, covered targets and changed approval controls.
- Submit movement, press/release and optional restoration in one verified input batch; validate pixel normalization, screen/clip bounds and x86/x64 input layouts.
- Recheck browser permission target identity and menu ownership; support precisely linked menus already opened by the user.
- Add production-method input regressions to Windows CI for PS5 x64/x86 and PS7 x64.
- Rotate approval attempts across IDE windows so a busy first window does not delay others indefinitely.
- Isolate stale window/control failures, recheck action state after host lookups, and avoid a second physical click after an Invoke error.
- Keep the scanner running when notification preferences change; preserve a deliberate OFF during a workspace-trust transition.
- Validate both PowerShell engines, concurrent scanner ownership and handoff, source encoding, and VSIX contents in GitHub CI.
- Permission forms require a readable SelectionItem selection; unsupported legacy-only controls are skipped.
- Recognize dedicated command permission forms rendered outside the conversation.
- Scroll the verified one-time option and same-form Submit into view for long commands.
- Recheck the permission target, selection, form identity and owning host before acting; keep ordinary questions excluded.
- Recognize the browser domain permission card and choose Allow Once.
- Handle the narrow sidebar where Allow Once is folded into More actions.
- Keep browser approval scoped to the active card and preserve command one-time approvals.
- Support the current one-time permission card and its scoped Submit button; exclude completed Run tool records.
- Support the current
Antigravity IDE.exeand legacy Antigravity host names; verify window process ownership. - Repair stop/start races, cancel delayed restarts, and let waiting windows take over scanner ownership.
- Support Chinese approval labels; exclude generic dialog actions and allow negative multi-monitor coordinates.
- Verify the physical click target, handle hidden windows conservatively, and stop when the owning extension host exits.
- Add lifecycle and scanner regression tests, Windows CI, and public contributor instructions.
- Explain native Always Proceed and the limits of automatic approval.
- ๐ก๏ธ ่ฏฏ็นไฟฎๅค๏ผๆถ็ดงๅ็ผๅน้
่พน็๏ผ
Application SettingsใContinuous Integration่ฟ็ฑปๆฎ้ๆ้ฎไธๅ่ขซApply/Continue่ฏฏๅค - ๐ฑ๏ธ ้ผ ๆ ไฝ้ชไผๅ๏ผ็ฉ็็นๅปๅ้ๅ้ป่ฎคๆขๅค้ผ ๆ ๅไฝ็ฝฎ๏ผๅๅฐๆข้ผ ๆ ๆ
- โ๏ธ ๆฐๅข่ฎพ็ฝฎ๏ผๆฏๆ้ ็ฝฎ่ชๅจๅฏๅจใๆซๆ้ด้ใ็นๅปๅทๅดใ้ผ ๆ ๆขๅคๅ้็ฅๅผๅ ณ
- ๐งญ ๆฐๅขๅฝไปค๏ผๆฏๆๅฝไปค้ขๆฟ้ๅฏๆซๆๅจใๆๅผๆฉๅฑๆฅๅฟ
- ๐งช ๆต่ฏ้พไฟฎๅค๏ผ
npm run lintไธๅไพ่ต็ผบๅคฑ็ ESLint๏ผๆฐๅข PowerShell ๅน้ ่งๅ่ชๆต - ๐ ไพ่ตๆธ
็๏ผ็งป้ค v5.0 CDP ๅฎ้ช้็็
wsไพ่ต๏ผnpm auditๅๅฐ 0 ๆผๆด
- ๐ ๆถๆๅๅฝ๏ผไป CDP ๆนๆกๅๅฝ UIAutomation ็ดๆฅๆ้ฎๆฃๆตใUIAutomation ่ฝ็ๅฐ Antigravity ็ๆ้ๆ้ฎๅนถๆฏๆ InvokePattern๏ผๆ ้ CDP ็ซฏๅฃ
- ๐งน ๆ็ฎ้ๅ๏ผ
extension.tsไป ~150 ่ก๏ผautoClicker.ps1ไป ~120 ่กใๅป้คๆๆ Oracle/็ถๆๆฃๆต/ๆ็บนๅป้็ญๅคๆ้ป่พ - ๐ฏ ๆบ่ฝๅน้ ๏ผๅ็ผๅน้ + ็ฒพ็กฎๅน้ + ๆ้คๅ่กจ๏ผ่ฆ็ 12 ็ฑปๆ้ๅ ณ้ฎ่ฏ๏ผๆ้ค IDE ่ๅ่ฏฏ่งฆ
- โก ๅๅฑ็นๅป๏ผไผๅ InvokePattern๏ผๆ ็ฆ็นๆขๅ ๏ผ๏ผๅคฑ่ดฅๆถๅ้ user32.dll ็ฉ็็นๅป
- ๐ Architecture revert: Back to UIAutomation from CDP. UIAutomation can see Antigravity's permission buttons with InvokePattern support โ no CDP port needed
- ๐งน Minimal rewrite: ~150 lines extension.ts, ~120 lines autoClicker.ps1. Removed Oracle/state detection/fingerprint dedup complexity
- ๐ฏ Smart matching: Prefix + exact match + exclusion list covering 12 permission keyword categories
- โก Two-layer click: InvokePattern first (no focus stealing), user32.dll physical click fallback
- ๐ง CDP ๆถๆๅฎ้ช๏ผๅ
จ้ข่ฟ็งปๅฐ Chrome DevTools Protocol๏ผ้่ฟ WebSocket ่ฟๆฅ Antigravity ็ Chromium ่ฐ่ฏ็ซฏๅฃ๏ผๅจ webview ๅ
ๆง่ก JS ๆฃๆตๆ้ฎ +
Input.dispatchMouseEventๆจกๆ็นๅป - ๐ฆ ๆฐๅขๆจกๅ๏ผ
cdpClient.ts๏ผWebSocket CDP ๅฎขๆท็ซฏ๏ผใbuttonDetector.ts๏ผDOM ๆ้ฎๆซๆ่ๆฌ๏ผใshortcutPatcher.ts๏ผ่ชๅจไฟฎ่กฅๅฟซๆทๆนๅผๆทปๅ--remote-debugging-port=9222๏ผ - โ ๅทฒๅบๅผ๏ผ็กฎ่ฎค UIAutomation ไป่ฝ็ฉฟ้ๆๆฐ็ Antigravity ๅ๏ผv5.1.0 ๅๅฝ UIAutomation
- ๐ง CDP architecture experiment: Full migration to Chrome DevTools Protocol โ WebSocket connection to Chromium debug port, JS injection for button detection +
Input.dispatchMouseEventfor clicks - ๐ฆ New modules:
cdpClient.ts,buttonDetector.ts,shortcutPatcher.ts - โ Superseded: Reverted to UIAutomation in v5.1.0 after confirming it still works with latest Antigravity
- ๐ง ๆ็บนๅป้็ผๅญ๏ผๆฏไธชๆ้ฎ็นๅปๅ่ฎฐๅฝไฝ็ฝฎๆ็บน๏ผName + X/Y ๅๆดๅฐ 10px๏ผ๏ผๅไธๆ้ฎไธๅ้ๅค็นๅปใ่งฃๅณ v2.1.2 Legacy ๆจกๅผไธ็ฏ็็นๅปๅๅฒ "Always run" ๅฏผ่ดๆข็ฆ็น็้ฎ้ข
- ๐ ๅๆๅณ็ญ้ๆ๏ผโ ่ฟ่กไธญ โ ๅ จ้็นๅป๏ผๆ ้ๅป้๏ผ | ้่ฏฏ้ขๆฟ โ ไป Retry | Antigravity ็ฉบ้ฒ โ ๅป้็นๅป | ้ Antigravity โ ๅ จ้ + ๅป้
- โฑ๏ธ TTL ่ชๅจๆธ ็ฉบ๏ผๆ็บน็ผๅญ 120 ็งๅ่ชๅจๆธ ็ฉบ๏ผ้ๅบๆฐไธ่ฝฎๅฏน่ฏ/UI ๅทๆฐ
- ๐ง Fingerprint dedup cache: After clicking a button, records its position fingerprint (Name + X/Y rounded to 10px). Same button is never re-clicked
- ๐ Four-state logic: โ running โ click all | error panel โ Retry only | Antigravity idle โ dedup click | non-Antigravity โ click all + dedup
- โฑ๏ธ TTL auto-clear: Fingerprint cache auto-clears every 120s for new conversations/UI refreshes
- ๐ ไฟฎๅค็ฎญๅคดๆ้ฎ่ฏฏๅค๏ผ
Add context/Cancel็ญๅ่ฝๆ้ฎ็ CSS class ๅซopacity-70+rounded-full๏ผ่ขซ่ฏฏ่ฏๅซไธบ่ๅคฉๅทฅๅ ทๆ ็ฐ่ฒ็ฎญๅคด โ ๆๆๆ้ๆ้ฎๆซๆ่ขซ่ทณ่ฟ - ๐ง ไฟฎๅคๆนๅผ๏ผ็ฐ่ฒ็ฎญๅคดๅคๅฎๅขๅ
Name ๅฟ ้กปไธบ็ฉบ็บฆๆ๏ผ็ๆญฃ็็ฐ่ฒ็ฎญๅคดๆฏ็บฏๅพๆ ๆ ๆๅญ๏ผ - ๐ Fix arrow button false positive:
Add context/Cancelbuttons matched the gray arrow fingerprint โ caused all permission button scanning to be skipped - ๐ง Fix: Added
Name must be emptyconstraint for gray arrow detection
- ๐ ้ Antigravity IDE ๅ้๏ผๆฃๆตๅฐ่ๅคฉๅทฅๅ ทๆ ๏ผโ / โ ๏ผๆถไฝฟ็จ Oracle ๆบ่ฝๆจกๅผ๏ผๆชๆฃๆตๅฐๆถ๏ผVS Code / Cursor / ๅ ถไป IDE๏ผ่ชๅจๅ้ไผ ็ปๆจกๅผ๏ผ็ฒ็นๆๆๆ้ๆ้ฎ
- ๐ Non-Antigravity fallback: Oracle mode when chat toolbar detected; legacy mode for VS Code / Cursor / other IDEs โ click all permission buttons unconditionally
Don't minimize the IDE! Chromium suspends the accessibility tree when minimized. Keep the IDE window available. API invocation may work in the background; physical fallback skips points covered by another app.
ไธ่ฆๆๅฐๅ IDE๏ผ Chromium ๆๅฐๅๅไผๆญๅผๆ ้็ขๆ ใ ไฟๆ IDE ็ชๅฃๅฏ่ฎฟ้ฎใAPI ่ฐ็จๅฏ่ฝๆฏๆๅๅฐๅฎกๆน๏ผ็ฉ็็นๅปๅ้ไผ่ทณ่ฟ่ขซๅ ถๅฎๅบ็จ้ฎๆก็็ฎๆ ใ
If this extension saved your sanity and your mouse, consider buying me a coffee! ๅฆๆ่ฟไธชๆไปถๆฏๆไบไฝ ็้ผ ๆ ๅ็ฒพ็ฅ็ถๆ๏ผๆฌข่ฟๆๅไธๆฏๅๅก๏ผ
Built with pure rage against permission popups.
ๅบไบๅฏนๆ้ๅผน็ช็็บฏ็ฒนๆคๆ่ๅผๅใ
