Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/cockpit-core/src/modules/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const ONBOARD_POLL_DELAY_MS: u64 = 500;
const API_CACHE_DIR: &str = "cache/quota_api_v1_desktop";
const API_CACHE_VERSION: u8 = 1;
const API_CACHE_TTL_MS: i64 = 60_000;
const DEFAULT_CLOUD_CODE_IDE_VERSION: &str = "1.20.5";
const DEFAULT_CLOUD_CODE_IDE_VERSION: &str = "2.23.1";
const DEFAULT_LOAD_CODE_ASSIST_UA_OS: &str = "windows";
const DEFAULT_LOAD_CODE_ASSIST_UA_ARCH: &str = "amd64";
const DEFAULT_GOOGLE_API_NODEJS_CLIENT_VERSION: &str = "10.3.0";
const DEFAULT_CLOUD_CODE_USER_AGENT: &str = "antigravity/1.20.5 windows/amd64";
const DEFAULT_CLOUD_CODE_USER_AGENT: &str = "antigravity/2.23.1 windows/amd64";
const DEFAULT_LOAD_CODE_ASSIST_USER_AGENT: &str =
"antigravity/1.20.5 windows/amd64 google-api-nodejs-client/10.3.0";
"antigravity/2.23.1 windows/amd64 google-api-nodejs-client/10.3.0";
const DEFAULT_X_GOOG_API_CLIENT_NODE_VERSION: &str = "22.21.1";

#[derive(Debug, Clone, Default)]
Expand Down
16 changes: 13 additions & 3 deletions crates/cockpit-core/src/modules/wakeup_gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,16 +529,26 @@ fn antigravity_extension_bin_dir(root: &std::path::Path) -> std::path::PathBuf {

#[cfg(target_os = "macos")]
fn default_antigravity_app_root() -> std::path::PathBuf {
let candidate = std::path::PathBuf::from("/Applications/Antigravity.app");
if candidate.exists() {
return candidate;
}
std::path::PathBuf::from("/Applications/Antigravity IDE.app")
}

#[cfg(target_os = "windows")]
fn default_antigravity_app_root() -> std::path::PathBuf {
std::env::var("LOCALAPPDATA")
let local = std::env::var("LOCALAPPDATA")
.map(std::path::PathBuf::from)
.unwrap_or_default()
.join("Programs")
.join("Antigravity IDE")
.join("Programs");
for name in ["antigravity", "Antigravity", "Antigravity IDE"] {
let candidate = local.join(name);
if candidate.exists() {
return candidate;
}
}
local.join("Antigravity IDE")
}

#[cfg(all(not(target_os = "macos"), not(target_os = "windows")))]
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/modules/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const ONBOARD_POLL_DELAY_MS: u64 = 500;
const API_CACHE_DIR: &str = "cache/quota_api_v1_desktop";
const API_CACHE_VERSION: u8 = 1;
const API_CACHE_TTL_MS: i64 = 60_000;
const DEFAULT_CLOUD_CODE_IDE_VERSION: &str = "1.20.5";
const DEFAULT_CLOUD_CODE_IDE_VERSION: &str = "2.23.1";
const DEFAULT_LOAD_CODE_ASSIST_UA_OS: &str = "windows";
const DEFAULT_LOAD_CODE_ASSIST_UA_ARCH: &str = "amd64";
const DEFAULT_GOOGLE_API_NODEJS_CLIENT_VERSION: &str = "10.3.0";
const DEFAULT_CLOUD_CODE_USER_AGENT: &str = "antigravity/1.20.5 windows/amd64";
const DEFAULT_CLOUD_CODE_USER_AGENT: &str = "antigravity/2.23.1 windows/amd64";
const DEFAULT_LOAD_CODE_ASSIST_USER_AGENT: &str =
"antigravity/1.20.5 windows/amd64 google-api-nodejs-client/10.3.0";
"antigravity/2.23.1 windows/amd64 google-api-nodejs-client/10.3.0";
const DEFAULT_X_GOOG_API_CLIENT_NODE_VERSION: &str = "22.21.1";

#[derive(Debug, Clone, Default)]
Expand Down
16 changes: 13 additions & 3 deletions src-tauri/src/modules/wakeup_gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,16 +593,26 @@ fn antigravity_extension_bin_dir(root: &std::path::Path) -> std::path::PathBuf {

#[cfg(target_os = "macos")]
fn default_antigravity_app_root() -> std::path::PathBuf {
let candidate = std::path::PathBuf::from("/Applications/Antigravity.app");
if candidate.exists() {
return candidate;
}
std::path::PathBuf::from("/Applications/Antigravity IDE.app")
}

#[cfg(target_os = "windows")]
fn default_antigravity_app_root() -> std::path::PathBuf {
std::env::var("LOCALAPPDATA")
let local = std::env::var("LOCALAPPDATA")
.map(std::path::PathBuf::from)
.unwrap_or_default()
.join("Programs")
.join("Antigravity IDE")
.join("Programs");
for name in ["antigravity", "Antigravity", "Antigravity IDE"] {
let candidate = local.join(name);
if candidate.exists() {
return candidate;
}
}
local.join("Antigravity IDE")
}

#[cfg(all(not(target_os = "macos"), not(target_os = "windows")))]
Expand Down