MCPcopy Create free account
hub / github.com/MagicCube/agentara / useContextValue

Function useContextValue

web/src/components/ai-elements/context.tsx:34–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32const ContextContext = createContext<ContextSchema | null>(null);
33
34const useContextValue = () => {
35 const context = useContext(ContextContext);
36
37 if (!context) {
38 throw new Error("Context components must be used within Context");
39 }
40
41 return context;
42};
43
44export type ContextProps = ComponentProps<typeof HoverCard> & ContextSchema;
45

Callers 8

ContextIconFunction · 0.85
ContextTriggerFunction · 0.85
ContextContentHeaderFunction · 0.85
ContextContentFooterFunction · 0.85
ContextInputUsageFunction · 0.85
ContextOutputUsageFunction · 0.85
ContextReasoningUsageFunction · 0.85
ContextCacheUsageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected