mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
refactor(panel): unify settings and bridge contracts, prune dead code, and rename trajectory metrics
- Share settings normalization and window-bridge protocol contracts across frontend and backend - Encapsulate trajectory cache accessors inside config.mjs and validate bundle imports/syntax before writing - Remove dead selectors, unused symbols, duplicate re-export imports, and unmounted account tab instantiation - Rename speed-metrics.mjs to trajectory-metrics.mjs and audit-fixes.test.mjs to cross-module-regressions.test.mjs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export const WINDOW_BRIDGE_KEY = '__AGUsageMonitorBridge';
|
||||
export const WINDOW_BRIDGE_ROUTE_KEY = 'hostRouteCascadeId';
|
||||
export const WINDOW_OVERLAY_KEY = '__AGUsageMonitorOverlay';
|
||||
|
||||
export const WINDOW_OVERLAY_METHODS = Object.freeze({
|
||||
ensureAlive: 'ensureAlive',
|
||||
getDockKind: 'getDockKind',
|
||||
getMountMode: 'getMountMode',
|
||||
updateBridge: 'updateBridge',
|
||||
applyMountMode: 'applyMountMode',
|
||||
syncHostRoute: 'syncHostRoute',
|
||||
deliverRpc: 'deliverRpc',
|
||||
dispose: 'dispose',
|
||||
});
|
||||
|
||||
export function readInjectedWindowBridge() {
|
||||
return typeof window === 'undefined' ? undefined : window[WINDOW_BRIDGE_KEY];
|
||||
}
|
||||
Reference in New Issue
Block a user