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

Function markStaleForSettingsCwd

desktop/runtime/settings-refresh.ts:190–202  ·  view source on GitHub ↗
(settingsCwd?: string | undefined | null | undefined)

Source from the content-addressed store, hash-verified

188 }
189
190 function markStaleForSettingsCwd(settingsCwd?: string | undefined | null | undefined) {
191 if (!settingsCwd?.trim()) return
192 const normalizedSettingsCwd = path.resolve(settingsCwd)
193
194 for (const { runtimeKey, settingsCwd: runtimeSettingsCwd } of getRuntimeRecords()) {
195 if (!runtimeSettingsCwd || path.resolve(runtimeSettingsCwd) !== normalizedSettingsCwd) {
196 continue
197 }
198
199 staleGenerations.set(runtimeKey, (staleGenerations.get(runtimeKey) ?? 0) + 1)
200 void reloadIfSafe(runtimeKey).catch(() => undefined)
201 }
202 }
203
204 function isStale(sessionPath: string | null | undefined) {
205 const runtimeKey = getPersistedSessionPath(sessionPath ?? null)

Callers

nothing calls this directly

Calls 2

reloadIfSafeFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected