fix(antigravity): add missing antigravityProjectPersistence.ts module

The quota-strategy engine (quotaStrategies.ts) imports from
antigravityProjectPersistence.ts, but only antigravityProjectPersist.ts
existed in the tree.  Add the missing module with the expected
preferAntigravityConnectionsWithStoredProject() helper and re-export
the existing persistDiscoveredAntigravityProjectId().

Co-authored-by: diegosouzapw <diegosouza.pw@outlook.com>
This commit is contained in:
xz-dev
2026-08-06 23:51:11 -03:00
committed by diegosouzapw
parent 798d8eda94
commit 58d5d2d8f1

View File

@@ -1,9 +1,24 @@
/**
* Re-export from `antigravityProjectPersist.ts` plus a connection-preference helper.
*
* The persistence layer for a runtime-discovered Antigravity projectId lives in
* the sibling file `antigravityProjectPersist.ts` (named by its core function).
* This module adds `preferAntigravityConnectionsWithStoredProject()`, used by the
* quota-strategy engine to give priority to connections whose projectId has
* already been discovered and persisted.
*/
import { persistDiscoveredAntigravityProjectId } from "./antigravityProjectPersist.ts";
export { persistDiscoveredAntigravityProjectId };
/**
* Return only the Antigravity connections that already have a stored projectId.
*
* A connection whose projectId has been discovered and persisted can be used
* immediately; a connection without one would need to go through the Code Assist
* bootstrap first, which is handled by the calling strategy's fallback path.
*/
export function preferAntigravityConnectionsWithStoredProject(
connections: Array<Record<string, unknown>>
): Array<Record<string, unknown>> {