MCPcopy Create free account
hub / github.com/CopilotKit/aimock / performFixturesReset

Function performFixturesReset

src/server.ts:254–276  ·  view source on GitHub ↗

* Perform a full fixtures reset: clear the fixtures array, journal, video/fal * generation state, and the interaction/event-id counters, then zero the * `aimock_fixtures_loaded` gauge. Shared by `/reset/fixtures` and the * deprecated `/reset` alias.

(
  fixtures: Fixture[],
  journal: Journal,
  videoStates: VideoStateMap,
  openRouterVideoJobs: OpenRouterVideoJobMap,
  veoVideoJobs: VeoVideoJobMap,
  grokVideoJobs: GrokVideoJobMap,
  defaults: HandlerDefaults,
)

Source from the content-addressed store, hash-verified

252 * deprecated `/reset` alias.
253 */
254function performFixturesReset(
255 fixtures: Fixture[],
256 journal: Journal,
257 videoStates: VideoStateMap,
258 openRouterVideoJobs: OpenRouterVideoJobMap,
259 veoVideoJobs: VeoVideoJobMap,
260 grokVideoJobs: GrokVideoJobMap,
261 defaults: HandlerDefaults,
262): void {
263 fixtures.length = 0;
264 journal.clear();
265 videoStates.clear();
266 openRouterVideoJobs.clear();
267 veoVideoJobs.clear();
268 grokVideoJobs.clear();
269 falJobs.clear();
270 falQueueStates.clear();
271 resetInteractionCounter();
272 resetEventIdCounter();
273 if (defaults.registry) {
274 defaults.registry.setGauge("aimock_fixtures_loaded", {}, fixtures.length);
275 }
276}
277
278/**
279 * Handle requests under `/__aimock/`. Returns `true` if the request was

Callers 1

handleControlAPIFunction · 0.85

Calls 4

resetInteractionCounterFunction · 0.85
resetEventIdCounterFunction · 0.85
setGaugeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…