Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

619 B
Raw Blame
/**
 * Lobe Notebook Executor
 *
 * Creates and exports the NotebookExecutor instance for registration.
 * Injects notebookService as dependency.
 */
import { NotebookExecutor } from '@lobechat/builtin-tool-notebook/executor';

import { invalidateDocumentMutation } from '@/services/document/invalidation';
import { notebookService } from '@/services/notebook';

// Create executor instance with client-side service
export const notebookExecutor = new NotebookExecutor(notebookService, {
  onDocumentsMutated: ({ documentId, topicId }) =>
    invalidateDocumentMutation({ cause: 'notebook', documentId, topicId }),
});