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

Function findOtherKiloDevSessions

dev/local/tmux.ts:46–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44function findOtherKiloDevSessions(): string[] {
45 const ownSession = getSessionName();
46 try {
47 const output = execSync('tmux list-sessions -F "#{session_name}"', {
48 encoding: 'utf-8',
49 }).trim();
50 if (output === '') return [];
51 return output.split('\n').filter(name => name.startsWith('kilo-dev-') && name !== ownSession);
52 } catch {
53 return [];
54 }
55}
56
57function createSession(sessionName: string, env?: Record<string, string>): void {
58 const repoRoot = getWorktreeRoot();
59 // When another tmux server is already running (e.g. from a sibling worktree),
60 // `tmux new-session` attaches to that existing server and inherits its
61 // environment — NOT our current process.env. Pass critical vars with -e and

Callers 3

doCleanupFunction · 0.90
cmdUpFunction · 0.90
cmdStopFunction · 0.90

Calls 1

getSessionNameFunction · 0.85

Tested by

no test coverage detected