MCPcopy Index your code
hub / github.com/callstack/agent-device / createRemoteSessionName

Function createRemoteSessionName

src/cli/commands/connection.ts:377–385  ·  view source on GitHub ↗
(stateDir: string)

Source from the content-addressed store, hash-verified

375};
376
377function createRemoteSessionName(stateDir: string): string {
378 for (let attempt = 0; attempt < 8; attempt += 1) {
379 const candidate = `adc-${crypto.randomBytes(3).toString('hex')}`;
380 if (!readRemoteConnectionState({ stateDir, session: candidate })) {
381 return candidate;
382 }
383 }
384 return `adc-${Date.now().toString(36)}-${crypto.randomBytes(2).toString('hex')}`;
385}
386
387function renderDisconnectOutput(
388 session: string,

Callers 1

resolveConnectContextFunction · 0.85

Calls 1

Tested by

no test coverage detected