Close terminal session when hiding terminal panel

- Attempt `api.terminal.close` when toggling an open terminal off
- Fall back to sending `exit` if close is unavailable or fails
- Include `api` in callback dependencies to keep behavior current
901579233cJulius Marminge committed on 2/13/2026, 6:20:01 AM· committed by Julius Marmingeparentd27b08b
1 file changedLine totals unavailable