MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / invalidateRuntimeHostSettings

Function invalidateRuntimeHostSettings

desktop/runtime-host/client-bridge.ts:506–527  ·  view source on GitHub ↗
(
  request: {
    sessionPath?: string | undefined | null | undefined
    projectPath?: string | undefined | null | undefined
  } = {},
)

Source from the content-addressed store, hash-verified

504}
505
506export async function invalidateRuntimeHostSettings(
507 request: {
508 sessionPath?: string | undefined | null | undefined
509 projectPath?: string | undefined | null | undefined
510 } = {},
511) {
512 const targets = new Set<HostConnection>()
513 if (request.sessionPath) {
514 const host = hostByAlias.get(request.sessionPath)
515 if (host) targets.add(host)
516 } else {
517 for (const host of hosts) targets.add(host)
518 }
519
520 await Promise.all(
521 [...targets].filter(isHostRunningOrStarting).map((host) =>
522 invokeRuntimeHostOnHost(host, 'invalidateRuntimeSettings', request).catch((error) => {
523 console.warn(`Failed to invalidate Pi runtime host settings (${host.label}).`, error)
524 }),
525 ),
526 )
527}
528
529async function invokeRuntimeHostOnHost<TName extends RuntimeHostRequestName>(
530 host: HostConnection,

Callers 6

updatePiSettingFunction · 0.90
installPiPackageFunction · 0.90
removePiPackageFunction · 0.90
installPiSkillFunction · 0.90
removePiSkillFunction · 0.90

Calls 3

invokeRuntimeHostOnHostFunction · 0.85
getMethod · 0.80
allMethod · 0.80

Tested by

no test coverage detected