draft email options

This commit is contained in:
Arjun 2026-03-23 23:04:22 +05:30 committed by arkml
parent 2d62824030
commit fa07a75358
4 changed files with 190 additions and 9 deletions

View file

@ -3490,6 +3490,20 @@ function App() {
return () => window.removeEventListener('calendar-block:join-meeting', handler)
}, [])
// Email block: draft with assistant
useEffect(() => {
const handler = () => {
const pending = window.__pendingEmailDraft
if (pending) {
setPresetMessage(pending.prompt)
setIsChatSidebarOpen(true)
window.__pendingEmailDraft = undefined
}
}
window.addEventListener('email-block:draft-with-assistant', handler)
return () => window.removeEventListener('email-block:draft-with-assistant', handler)
}, [])
const ensureWikiFile = useCallback(async (wikiPath: string) => {
const resolvedPath = toKnowledgePath(wikiPath)
if (!resolvedPath) return null