* Checks if iTerm2 backend is available (in iTerm2 with it2 CLI installed).
()
| 85 | * Checks if iTerm2 backend is available (in iTerm2 with it2 CLI installed). |
| 86 | */ |
| 87 | async isAvailable(): Promise<boolean> { |
| 88 | const inITerm2 = isInITerm2() |
| 89 | logForDebugging(`[ITermBackend] isAvailable check: inITerm2=${inITerm2}`) |
| 90 | if (!inITerm2) { |
| 91 | logForDebugging('[ITermBackend] isAvailable: false (not in iTerm2)') |
| 92 | return false |
| 93 | } |
| 94 | const it2Available = await isIt2CliAvailable() |
| 95 | logForDebugging( |
| 96 | `[ITermBackend] isAvailable: ${it2Available} (it2 CLI ${it2Available ? 'found' : 'not found'})`, |
| 97 | ) |
| 98 | return it2Available |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Checks if we're currently running inside iTerm2. |
nothing calls this directly
no test coverage detected