mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-18 21:21:11 +02:00
draft email options
This commit is contained in:
parent
2d62824030
commit
fa07a75358
4 changed files with 190 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue