fix(terminal): keep inventory host inference typed

This commit is contained in:
Brennan Benson
2026-08-16 19:16:07 -07:00
parent a7fdbc88ea
commit 5547386cb7
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -31333,7 +31333,11 @@ export class OrcaRuntimeService {
if (connectionId === undefined) {
for (const process of processes) {
const hostId = getPtyExecutionHost(process.id)
if (hostId !== 'foreign' && parseExecutionHostId(hostId)?.kind === 'ssh') {
if (
hostId &&
hostId !== 'foreign' &&
parseExecutionHostId(hostId)?.kind === 'ssh'
) {
hostIds.add(hostId)
}
}
@@ -3,6 +3,7 @@ import { OrcaRuntimeService } from './orca-runtime'
import { getDefaultWorkspaceSession } from '../../shared/constants'
import type { WorkspaceSessionState } from '../../shared/workspace-session-state-types'
import { folderWorkspaceKey } from '../../shared/workspace-scope'
import type { FolderWorkspace } from '../../shared/folder-workspace-types'
// An agent once declared a task exited because `terminal list` came back without
// its worker: the worker was live on an SSH host, and nothing in the response
@@ -37,7 +38,7 @@ function makeStore() {
return {
getWorkspaceSession: vi.fn(() => session),
getWorkspaceSessionHostIds: vi.fn(() => ['local', 'ssh:box-1']),
getFolderWorkspaces: vi.fn(() => []),
getFolderWorkspaces: vi.fn((): FolderWorkspace[] => []),
getProjectGroups: vi.fn(() => []),
setWorkspaceSession: vi.fn(),
getRepos: vi.fn(() => REPOS),