MCPcopy Create free account
hub / github.com/openai/plugins / loadSnapshotsFromFile

Function loadSnapshotsFromFile

plugins/plugin-eval/src/core/observed-usage.js:170–180  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

168}
169
170async function loadSnapshotsFromFile(filePath) {
171 const resolvedPath = path.resolve(filePath);
172 if (!(await pathExists(resolvedPath))) {
173 throw new Error(`Observed usage file not found: ${resolvedPath}`);
174 }
175
176 const parsedItems = parseUsageContent(await readText(resolvedPath));
177 const snapshots = [];
178 parsedItems.forEach((item) => collectSnapshots(item, resolvedPath, snapshots));
179 return snapshots;
180}
181
182function createObservedUsageChecks(summary) {
183 const checks = [];

Callers 1

analyzeObservedUsageFunction · 0.85

Calls 4

pathExistsFunction · 0.90
readTextFunction · 0.90
parseUsageContentFunction · 0.85
collectSnapshotsFunction · 0.85

Tested by

no test coverage detected