Trouble with Tiptap AI Plugin: 'onLoading' Prop Not Triggering for Loading UI

35 Views Asked by At

I'm using the Tiptap AI plugin, and the suggestions are working well. However, I'm facing an issue with the loading UI not showing up when AI commands run. I've got a prop called "onLoading," but it's not triggering. Any ideas on how to fix this? Thanks a bunch!

Ai.configure({
  appId: TIPTAP_AI_APP_ID,
  token: TOKEN,
  baseUrl: TIPTAP_AI_BASE_URL,
  autocompletion: true,
  onLoading: () => {
    // Not getting called
    console.log('AILoading');
    setIsAiLoading(true);
    setAiError(null);
  },
  onSuccess: () => {
    setIsAiLoading(false);
    setAiError(null);
  },
  onError: (error) => {
    setIsAiLoading(false);
    setAiError(error.message);
  },
});
0

There are 0 best solutions below