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

Function updatePiSettingInHost

desktop/runtime-host/settings-service.ts:224–240  ·  view source on GitHub ↗
(
  key: PiSettingsKey,
  value: unknown,
  projectPath?: string | undefined | null | undefined,
)

Source from the content-addressed store, hash-verified

222}
223
224export async function updatePiSettingInHost(
225 key: PiSettingsKey,
226 value: unknown,
227 projectPath?: string | undefined | null | undefined,
228): Promise<PiSettings> {
229 const settingsManager = await getPiSettingsManager(projectPath)
230 const updated =
231 updateBooleanSetting(settingsManager, key, value) ||
232 (await updateNonBooleanSetting(settingsManager, key, value, projectPath))
233
234 if (updated) {
235 await settingsManager.flush()
236 await markRuntimeSettingsStaleForProject(null)
237 }
238
239 return loadPiSettingsInHost(projectPath)
240}

Callers

nothing calls this directly

Calls 5

getPiSettingsManagerFunction · 0.85
updateBooleanSettingFunction · 0.85
updateNonBooleanSettingFunction · 0.85
loadPiSettingsInHostFunction · 0.85

Tested by

no test coverage detected