chore: clean up code — remove dead code, stale allows, eprintln→tracing, remove volatile data from docs
This commit is contained in:
@@ -117,7 +117,7 @@ Falls back to hardcoded values if the app isn't installed. No manual updates nee
|
||||
|
||||
## Stealth Features
|
||||
|
||||
- **TLS fingerprint**: BoringSSL with Chrome 142 JA3/JA4 + H2 fingerprint via `wreq`
|
||||
- **TLS fingerprint**: BoringSSL with Chrome JA3/JA4 + H2 fingerprint via `wreq` (version auto-detected)
|
||||
- **Protobuf**: Hand-rolled encoder producing byte-exact match to real webview traffic
|
||||
- **Warmup**: Mimics real webview startup RPC calls
|
||||
- **Heartbeat**: Periodic keep-alive matching real webview lifecycle
|
||||
@@ -160,7 +160,7 @@ The LS uses `daily-cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?
|
||||
|
||||
**Verify patch:** `grep -o 'detectAndUseProxy=[^;]*' /usr/share/antigravity/resources/app/extensions/antigravity/dist/extension.js` should show `detectAndUseProxy=1`.
|
||||
|
||||
**Model IDs** (for standalone LS testing): `MODEL_PLACEHOLDER_M18` = Gemini 3 Flash, `MODEL_PLACEHOLDER_M8` = Gemini 3 Pro (High), `MODEL_PLACEHOLDER_M7` = Gemini 3 Pro (Low), `MODEL_PLACEHOLDER_M26` = Claude Opus 4.6, `MODEL_PLACEHOLDER_M12` = Claude Opus 4.5, `MODEL_CLAUDE_4_5_SONNET` = Claude Sonnet 4.5.
|
||||
**Model IDs** (for standalone LS testing): See `docs/ls-binary-analysis.md` for the full proto enum mapping.
|
||||
|
||||
### Usage Stats
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ The proxy needs an OAuth token. Three ways to provide it:
|
||||
|
||||
## Stealth Features
|
||||
|
||||
- **TLS fingerprint**: BoringSSL with Chrome 142 JA3/JA4 + H2 fingerprint via `wreq`
|
||||
- **TLS fingerprint**: BoringSSL with Chrome JA3/JA4 + H2 fingerprint via `wreq` (version auto-detected)
|
||||
- **Protobuf**: Hand-rolled encoder producing byte-exact match to real webview traffic
|
||||
- **Warmup**: Mimics real webview startup RPC calls
|
||||
- **Heartbeat**: Periodic keep-alive matching real webview lifecycle
|
||||
|
||||
@@ -80,7 +80,6 @@ struct ResponseData {
|
||||
}
|
||||
|
||||
/// Build a full Response object matching the official OpenAI schema.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn build_response_object(data: ResponseData, params: &RequestParams) -> ResponsesResponse {
|
||||
ResponsesResponse {
|
||||
id: data.id,
|
||||
|
||||
@@ -115,8 +115,8 @@ fn detect_versions() -> DetectedVersions {
|
||||
const FALLBACK_CLIENT: &str = "1.16.5";
|
||||
|
||||
let Some(install_dir) = find_install_dir() else {
|
||||
eprintln!(
|
||||
"[constants] ⚠ Could not find Antigravity install — using fallback versions"
|
||||
tracing::warn!(
|
||||
"Could not find Antigravity install — using fallback versions"
|
||||
);
|
||||
return DetectedVersions {
|
||||
antigravity: FALLBACK_ANTIGRAVITY.to_string(),
|
||||
@@ -139,9 +139,12 @@ fn detect_versions() -> DetectedVersions {
|
||||
client: client_ver.unwrap_or_else(|| FALLBACK_CLIENT.to_string()),
|
||||
};
|
||||
|
||||
eprintln!(
|
||||
"[constants] ✓ Detected versions: Antigravity={}, Chrome={}, Electron={}, Client={}",
|
||||
versions.antigravity, versions.chrome, versions.electron, versions.client
|
||||
tracing::info!(
|
||||
antigravity = %versions.antigravity,
|
||||
chrome = %versions.chrome,
|
||||
electron = %versions.electron,
|
||||
client = %versions.client,
|
||||
"Detected app versions"
|
||||
);
|
||||
|
||||
versions
|
||||
|
||||
@@ -147,14 +147,6 @@ impl MitmStore {
|
||||
latest.remove(cascade_id)
|
||||
}
|
||||
|
||||
/// Peek at the latest usage without consuming it.
|
||||
#[allow(dead_code)]
|
||||
pub async fn peek_usage(&self, cascade_id: &str) -> Option<ApiUsage> {
|
||||
let latest = self.latest_usage.read().await;
|
||||
latest.get(cascade_id)
|
||||
.cloned()
|
||||
}
|
||||
|
||||
/// Get aggregate stats.
|
||||
pub async fn stats(&self) -> MitmStats {
|
||||
self.stats.read().await.clone()
|
||||
|
||||
@@ -35,8 +35,6 @@ fn domain_label(domain: &str) -> (&str, &str) {
|
||||
|
||||
const BOLD: &str = "\x1b[1m";
|
||||
const DIM: &str = "\x1b[2m";
|
||||
#[allow(dead_code)]
|
||||
const RED: &str = "\x1b[91m";
|
||||
const GREEN: &str = "\x1b[92m";
|
||||
const YELLOW: &str = "\x1b[93m";
|
||||
const CYAN: &str = "\x1b[96m";
|
||||
|
||||
Reference in New Issue
Block a user