MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / probeAccount

Function probeAccount

src/auth.js:1634–1652  ·  view source on GitHub ↗
(id, { allowLsStart = true } = {})

Source from the content-addressed store, hash-verified

1632const _probeInFlight = new Map();
1633
1634export async function probeAccount(id, { allowLsStart = true } = {}) {
1635 const existing = _probeInFlight.get(id);
1636 if (existing) return existing;
1637
1638 const account = accounts.find(a => a.id === id);
1639 if (!account) return null;
1640
1641 if (!allowLsStart) {
1642 const admission = getLsAdmissionForAccount(id);
1643 const skipped = residentProbeSkip(account, admission);
1644 if (skipped) return skipped;
1645 }
1646
1647 const promise = _probeAccountImpl(account, { allowLsStart }).finally(() => {
1648 _probeInFlight.delete(id);
1649 });
1650 _probeInFlight.set(id, promise);
1651 return promise;
1652}
1653
1654async function _probeAccountImpl(account, { allowLsStart = true } = {}) {
1655 let accountMaintenanceToken = null;

Callers 3

runAccountWarmupFunction · 0.90
handleDashboardApiFunction · 0.90
initAuthFunction · 0.85

Calls 3

getLsAdmissionForAccountFunction · 0.85
residentProbeSkipFunction · 0.85
_probeAccountImplFunction · 0.85

Tested by

no test coverage detected