refactor(execution-host): one isLocalExecutionHost in shared (#30241)

Replaces the agent-hooks copy, a private wrapper and five inline parseExecutionHostId(x)?.kind === 'local' checks.
This commit is contained in:
Neil
2026-10-18 00:34:36 -07:00
committed by GitHub
parent bf56095bdd
commit dcfbec0377
8 changed files with 22 additions and 22 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import {
getExecutionHostLabel,
getLocalExecutionHostLabel,
normalizeExecutionHostId,
parseExecutionHostId,
isLocalExecutionHost,
toSshExecutionHostId,
type ExecutionHostId
} from '../execution-host'
@@ -26,7 +26,7 @@ export function getHostContextLabel(
if (override) {
return override
}
if (parseExecutionHostId(hostId)?.kind === 'local') {
if (isLocalExecutionHost(hostId)) {
// An explicit null means the paired host platform is unknown (mobile); an
// omitted platform means use the current process (desktop).
if (sources.hostPlatform === null) {