Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript
386 B
Raw Blame
import { useContext } from 'react'
import { ChatThreadStateContext } from './context'
import type { ChatThreadStateContextValue } from './types'

export function useChatThreadStateContext(): ChatThreadStateContextValue {
  const ctx = useContext(ChatThreadStateContext)
  if (!ctx) throw new Error('useChatThreadStateContext must be used within ChatThreadStateProvider')
  return ctx
}