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

Function beginLsMaintenanceUse

src/langserver.js:337–347  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

335}
336
337export function beginLsMaintenanceUse(port) {
338 const entry = getLsEntryByPort(port);
339 if (!entry) return null;
340 if ((entry.activeRequests || 0) > 0) return null;
341 const key = keyByPort(port);
342 if (!key) return null;
343 if ((_maintenanceUses.get(key) || 0) > 0) return null;
344 _maintenanceUses.set(key, (_maintenanceUses.get(key) || 0) + 1);
345 touchEntry(entry);
346 return { key, port, generation: entry.generation };
347}
348
349export function endLsMaintenanceUse(token) {
350 const key = token?.key || '';

Callers 1

_probeAccountImplFunction · 0.85

Calls 3

getLsEntryByPortFunction · 0.85
keyByPortFunction · 0.85
touchEntryFunction · 0.85

Tested by

no test coverage detected