Fix incognito agent mode and cookbook tmux preview

This commit is contained in:
pewdiepie-archdaemon
2026-06-30 01:47:48 +00:00
parent a51f65e9ba
commit c987200616
3 changed files with 42 additions and 20 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ export function _sshCmd(host, cmd, port) {
/** Get SSH port for a given host (or task object) */
function _getPort(hostOrTask) {
if (!hostOrTask) return '';
if (typeof hostOrTask === 'object') return hostOrTask.sshPort || _getPort(hostOrTask.remoteServerKey || hostOrTask.remoteHost);
if (typeof hostOrTask === 'object') return hostOrTask.sshPort || _getPort(hostOrTask.remoteServerKey || hostOrTask.remoteHost || hostOrTask.payload?.remote_host);
const selected = hostOrTask === _envState.remoteHost ? _selectedServer() : null;
const srv = selected || _serverByVal(hostOrTask);
return srv?.port || '';