Function
inferLifecycleFromSnapshot
(
state: Record<string, unknown>,
)
Source from the content-addressed store, hash-verified
| 797 | } |
| 798 | |
| 799 | function 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 | |
| 811 | function isTerminalRunStatus(status: RunLifecycleEvent['status']): boolean { |
| 812 | return ( |
Tested by
no test coverage detected