MCPcopy
hub / github.com/vercel/next-forge / useOpenInContext

Function useOpenInContext

docs/components/ai-elements/open-in-chat.tsx:188–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186const OpenInContext = createContext<{ query: string } | undefined>(undefined);
187
188const useOpenInContext = () => {
189 const context = useContext(OpenInContext);
190 if (!context) {
191 throw new Error("OpenIn components must be used within an OpenIn provider");
192 }
193 return context;
194};
195
196export type OpenInProps = ComponentProps<typeof DropdownMenu> & {
197 query: string;

Callers 6

OpenInChatGPTFunction · 0.85
OpenInClaudeFunction · 0.85
OpenInT3Function · 0.85
OpenInSciraFunction · 0.85
OpenInv0Function · 0.85
OpenInCursorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected