diff --git a/memento-note/components/contextual-ai-chat.tsx b/memento-note/components/contextual-ai-chat.tsx index 1d5578c..ac3d1e1 100644 --- a/memento-note/components/contextual-ai-chat.tsx +++ b/memento-note/components/contextual-ai-chat.tsx @@ -97,6 +97,8 @@ interface ContextualAIChatProps { className?: string /** How to embed generated diagram images (markdown vs rich text HTML) */ diagramInsertFormat?: 'markdown' | 'html' + /** Called to trigger AI title generation for the note */ + onGenerateTitle?: () => void } // ── Component ───────────────────────────────────────────────────────────────── @@ -113,6 +115,7 @@ export function ContextualAIChat({ notebooks = [], className, diagramInsertFormat = 'markdown', + onGenerateTitle, }: ContextualAIChatProps) { const { t, language } = useLanguage() const webSearchAvailable = useWebSearchAvailable() @@ -513,8 +516,7 @@ export function ContextualAIChat({ return (