MCPcopy
hub / github.com/GitbookIO/gitbook / useAIChatController

Function useAIChatController

packages/gitbook/src/components/AI/useAIChat.tsx:463–469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

461 * Integrates with search state to synchronize ?ask= parameter.
462 */
463export function useAIChatController(): AIChatController {
464 const controller = React.useContext(AIChatControllerContext);
465 if (!controller) {
466 throw new Error('useAIChatController must be used within an AIChatProvider');
467 }
468 return controller;
469}

Callers 5

AIChatControlButtonFunction · 0.90
AIChatFunction · 0.90
EmbeddableAIChatFunction · 0.90
EmbeddableIframeAPIFunction · 0.90
useAIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected