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

Function useAIStore

packages/ai-devtools/src/store/ai-context.tsx:245–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243const AIContext = createContext<AIContextValue>()
244
245export function useAIStore(): AIContextValue {
246 const context = useContext(AIContext)
247 if (!context) {
248 throw new Error('useAIStore must be used within an AIProvider')
249 }
250 return context
251}
252
253export const AIProvider: ParentComponent = (props) => {
254 const [state, setState] = createStore<AIStoreState>({

Callers 6

HookDetailsFunction · 0.90
HookOverviewFunction · 0.90
MessagesPreviewFunction · 0.90
ToolsViewFunction · 0.90
HookDashboardFunction · 0.90
ToolFixtureFormFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected