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

Function inferLifecycleFromSnapshot

packages/ai-devtools/src/store/hook-registry.ts:799–809  ·  view source on GitHub ↗
(
  state: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

797}
798
799function inferLifecycleFromSnapshot(
800 state: Record<string, unknown>,
801): HookLifecycle {
802 if (state.status === 'error' || state.error) {
803 return 'errored'
804 }
805 if (state.isLoading || state.status === 'generating') {
806 return 'streaming'
807 }
808 return 'active'
809}
810
811function isTerminalRunStatus(status: RunLifecycleEvent['status']): boolean {
812 return (

Callers 1

applyHookEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected