MCPcopy Index your code
hub / github.com/codeaashu/claude-code / loadFlaggedPlugins

Function loadFlaggedPlugins

src/utils/plugins/pluginFlagging.ts:117–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 * meaningful data. Called by useManagePlugins during plugin refresh.
116 */
117export async function loadFlaggedPlugins(): Promise<void> {
118 const all = await readFromDisk()
119 const now = Date.now()
120 let changed = false
121
122 for (const [id, entry] of Object.entries(all)) {
123 if (
124 entry.seenAt &&
125 now - new Date(entry.seenAt).getTime() >= SEEN_EXPIRY_MS
126 ) {
127 delete all[id]
128 changed = true
129 }
130 }
131
132 cache = all
133 if (changed) {
134 await writeToDisk(all)
135 }
136}
137
138/**
139 * Get all flagged plugins from the in-memory cache.

Callers 1

Calls 3

readFromDiskFunction · 0.85
writeToDiskFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected