From cd73f08a6e71fd841bfbcfe85e4bc2a48f59fa52 Mon Sep 17 00:00:00 2001 From: Izhan-07 Date: Tue, 26 May 2026 11:36:11 +0530 Subject: [PATCH] fix: support Antigravity 2.0.1 IDE and Agent Manager split architecture --- multigravity.ps1 | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/multigravity.ps1 b/multigravity.ps1 index 0843cd3..35d0a99 100644 --- a/multigravity.ps1 +++ b/multigravity.ps1 @@ -21,16 +21,21 @@ $BASE = if ($env:MULTIGRAVITY_HOME) { $env:MULTIGRAVITY_HOME } else { "$env:USER function Find-Antigravity { $paths = @( - "$env:LOCALAPPDATA\Programs\Antigravity\Antigravity.exe", - "$env:PROGRAMFILES\Antigravity\Antigravity.exe", - "${env:ProgramFiles(x86)}\Antigravity\Antigravity.exe" + # Look for the new IDE executable in the standard installation paths + "$env:LOCALAPPDATA\Programs\Antigravity IDE\Antigravity-IDE.exe", + "$env:PROGRAMFILES\Antigravity-ide\Antigravity-ide.exe", + "${env:ProgramFiles(x86)}\Antigravity IDE\Antigravity IDE.exe", + # Fallbacks in case it installed inside the original folder + "$env:LOCALAPPDATA\Programs\Antigravity IDE\Antigravity IDE.exe", + "$env:PROGRAMFILES\Antigravity IDE\Antigravity IDE.exe", + "${env:ProgramFiles(x86)}\Antigravity IDE\Antigravity IDE.exe" ) foreach ($p in $paths) { if (Test-Path $p) { return $p } } # Try to find in PATH - $exeCommand = Get-Command antigravity.exe -ErrorAction SilentlyContinue + $exeCommand = Get-Command antigravity-ide.exe -ErrorAction SilentlyContinue if ($exeCommand) { return $exeCommand.Source } return $null @@ -99,6 +104,9 @@ function Invoke-CreateProfile { $PROFILE_DIR = "$BASE\$PROFILE" New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\.antigravity\extensions" | Out-Null + # --- ADD THIS NEW LINE --- + New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\.antigravity-ide\extensions" | Out-Null + # ------------------------- New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\AppData\Roaming" | Out-Null New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\AppData\Local" | Out-Null } @@ -139,6 +147,18 @@ function Invoke-CreateAuthOnlyProfile { } else { New-Item -ItemType Directory -Force -Path $extDir | Out-Null } + # --- ADD THIS NEW BLOCK FOR THE 2.0.1 IDE --- + $sysIdeExt = "$env:USERPROFILE\.antigravity-ide\extensions" + $ideExtDir = "$PROFILE_DIR\.antigravity-ide\extensions" + + if (Test-Path $sysIdeExt) { + if (Test-Path $ideExtDir) { Remove-Item $ideExtDir -Force -ErrorAction SilentlyContinue } + New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\.antigravity-ide" | Out-Null + New-Item -ItemType SymbolicLink -Path $ideExtDir -Target $sysIdeExt -ErrorAction SilentlyContinue | Out-Null + } else { + New-Item -ItemType Directory -Force -Path $ideExtDir | Out-Null + } + # -------------------------------------------- } function Invoke-LaunchProfile { @@ -376,7 +396,7 @@ function Invoke-ProfileStats { $profiles = Get-ChildItem -Directory -Path $BASE | Where-Object { $_.Name -ne ".templates" } foreach ($p in $profiles) { $size = Get-FolderSize $p.FullName - $extPath = Join-Path $p.FullName ".antigravity\extensions" + $extPath = Join-Path $p.FullName ".antigravity-ide\extensions" $extCount = if (Test-Path $extPath) { (Get-ChildItem $extPath).Count } else { 0 } Write-Host ("{0,-20} {1,-10} {2,-10}" -f $p.Name, $size, $extCount) }