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

Function startServiceInTmux

dev/local/runner.ts:110–121  ·  view source on GitHub ↗
(
  sessionName: string,
  serviceName: string,
  env?: Record<string, string>
)

Source from the content-addressed store, hash-verified

108 : buildStartCommand(serviceName, serviceNames);
109 const winIndex = createWindow(sessionName, serviceName, env, startupCommand);
110 setPaneServiceIdentity(sessionName, winIndex, 0, serviceName);
111 const logPath = path.join(findRepoRoot(), 'dev', 'logs', `${serviceName}.log`);
112 pipePane(sessionName, winIndex, 0, buildLogPipeCommand(logPath));
113}
114
115function buildInfraLogCommand(serviceName: string): string {
116 // Profile-gated services need --profile on every compose subcommand,
117 // including `logs`. Without it, Compose v2 filters the service out of
118 // the graph and the tmux pane is silent or errors. Shell-quote the
119 // profile and service names — they are safe identifiers today but the
120 // quoting keeps the command robust if a future maintainer adds a name
121 // containing whitespace or metacharacters.
122 const profile = getInfraProfile(serviceName);
123 const profileArg = profile ? `--profile ${shellQuote(profile)} ` : '';
124 return `docker compose ${profileArg}-f dev/docker-compose.yml logs -f ${shellQuote(serviceName)}`;

Callers 3

DashboardFunction · 0.90
cmdUpFunction · 0.90
restartServiceInTmuxFunction · 0.85

Calls 8

getServiceFunction · 0.90
createWindowFunction · 0.90
pipePaneFunction · 0.90
buildInfraLogCommandFunction · 0.85
buildStartCommandFunction · 0.85
buildLogPipeCommandFunction · 0.85
joinMethod · 0.80
findRepoRootFunction · 0.70

Tested by

no test coverage detected