MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / waitForEnvValueChange

Function waitForEnvValueChange

dev/local/runner.ts:461–481  ·  view source on GitHub ↗
(
  filePath: string,
  key: string,
  previousValue: string | undefined,
  timeoutMs: number,
  previousMtimeMs?: number
)

Source from the content-addressed store, hash-verified

459 sessionName,
460 currentPane.windowIndex,
461 envArgs ? `env ${envArgs} ${cmd}` : cmd,
462 currentPane.paneIndex
463 );
464 try {
465 ensureServiceLogPipe(sessionName, serviceName);
466 } catch {
467 // Restart succeeded; a dead pipe is recoverable on the next poll.
468 }
469 settle('relaunched');
470 } catch {
471 // The dashboard may have moved or closed the pane after we resolved it.
472 // Keep the TUI alive; the next explicit restart/view action can retry.
473 settle('gave-up');
474 }
475 }, POLL_MS);
476 });
477}
478
479/**
480 * Build `docker compose down` argv with `--profile` flags for every known
481 * infra profile so profile-gated services (e.g. grafana) are torn down
482 * alongside the default set. Compose v2's `down` behaviour with
483 * profile-gated services has varied across versions; passing the flags
484 * explicitly makes the teardown symmetric with startInfra and avoids

Callers 2

DashboardFunction · 0.90
cmdUpFunction · 0.90

Calls 3

readEnvValueFunction · 0.85
readEnvMtimeFunction · 0.85
sleepFunction · 0.70

Tested by

no test coverage detected