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

Function sessionExists

dev/local/tmux.ts:36–44  ·  view source on GitHub ↗
(sessionName?: string)

Source from the content-addressed store, hash-verified

34 const name = sessionName ?? getSessionName();
35 try {
36 // `=` forces an exact match; a bare -t prefix-matches sibling sessions.
37 execSync(`tmux has-session -t '=${name}'`, { stdio: 'ignore' });
38 return true;
39 } catch {
40 return false;
41 }
42}
43
44function findOtherKiloDevSessions(): string[] {
45 const ownSession = getSessionName();
46 try {
47 const output = execSync('tmux list-sessions -F "#{session_name}"', {

Callers 4

cmdUpFunction · 0.90
cmdStatusFunction · 0.90
cmdRestartFunction · 0.90
cmdStopFunction · 0.90

Calls 1

getSessionNameFunction · 0.85

Tested by

no test coverage detected