()
| 28 | const root = getWorktreeRoot(); |
| 29 | const slug = path.basename(root).replace(/[^A-Za-z0-9_-]/g, '_'); |
| 30 | return `kilo-dev-${slug}`; |
| 31 | } |
| 32 | |
| 33 | function sessionExists(sessionName?: string): boolean { |
| 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' }); |
no test coverage detected