MCPcopy Create free account
hub / github.com/TanStack/ai / attachRunToHook

Function attachRunToHook

packages/ai-devtools/src/store/hook-registry.ts:683–691  ·  view source on GitHub ↗
(
  state: HookRegistryState,
  hookId: string,
  runId: string,
)

Source from the content-addressed store, hash-verified

681}
682
683function attachRunToHook(
684 state: HookRegistryState,
685 hookId: string,
686 runId: string,
687): void {
688 const hook = state.hooks[hookId]
689 if (!hook || hook.runIds.includes(runId)) return
690 hook.runIds.push(runId)
691}
692
693function syncRunsFromSnapshot(
694 state: HookRegistryState,

Callers 2

applyHookEventFunction · 0.85
syncRunsFromSnapshotFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected