mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
* fix: remove tracked node_modules/.bin files * added to .gitignore * update compose * feat: Add AI brain and summary features for email - Implemented EnableBrain action to subscribe to mail gateway - Created GetSummary action to retrieve email thread summaries - Added useSummary hook for fetching summaries - Introduced mail0_summary database table - Added Brain button to app sidebar for enabling AI features * fix: Improve null safety and remove unused imports - Fixed potential null access in thread-display by checking array first - Removed unused markAsReadAction import in use-threads hook - Removed unnecessary cache deletion logic in IndexedDB storage provider - Removed threadId from ParsedMessage type definition * fix: Use environment variable for brain gateway URL - Replace hardcoded mail gateway URL with configurable environment variable - Improve flexibility and configuration of brain subscription endpoint * big push for connections and server actions: - unread count ✅ - remove `/connect-email` ✅ - update redirects and callbacks to `/settings/connections` ✅ - make everything else server actions ✅ - remove old route.ts files ✅ * feat: Improve HTML text extraction and email parsing - Added Cheerio for robust HTML text extraction in extractTextFromHTML - Enhanced null safety in Google email driver for sender name and subject - Updated mail list and threads hooks to handle potential undefined values - Improved text cleaning and handling of edge cases in email parsing * editor working * compose and video * fix: remove t3-oss env * update max results to 10 per requst * zero button floating sidebar * lots of changes: - removes old mail compose modal - smaller upload limit - useReducer on components with lots of state - image logos for some file types (still more to add) - resolve comments from previous review * add logos * straing to staging * improvements to create ui (#345) * made create wider * send to multiple emails and new ui for 'to' list * add icons for file upload (#346) * added icon for figma icon * added else ifs for other icons * add file name to the getLogo func * fix figma if statement * fix figma * fix excel * remove console logs * fix back to original component * file icons * ui tweaks --------- Co-authored-by: Nizzy <nizabizaher@gmail.com> Co-authored-by: nizzy <140507264+nizzyabi@users.noreply.github.com> * fix: sidebar and settings page ui fixes (#348) * fixes * define to emails * rotate on hover logo * early access count on homepage * updated readme --------- Co-authored-by: Sijan Mainali <sijanmainali2@gmail.com> Co-authored-by: Adam <x_1337@outlook.com> Co-authored-by: Nizzy <nizabizaher@gmail.com> Co-authored-by: user12224 <122770437+user12224@users.noreply.github.com> Co-authored-by: nizzy <140507264+nizzyabi@users.noreply.github.com>
97 lines
2.2 KiB
TypeScript
97 lines
2.2 KiB
TypeScript
import {
|
|
CheckSquare,
|
|
Code,
|
|
Heading1,
|
|
Heading2,
|
|
Heading3,
|
|
ImageIcon,
|
|
List,
|
|
ListOrdered,
|
|
Text,
|
|
TextQuote,
|
|
Twitter,
|
|
Youtube
|
|
} from 'lucide-react'
|
|
import { createSuggestionItems } from 'novel'
|
|
import { Command, renderItems } from 'novel'
|
|
import { uploadFn } from './image-upload'
|
|
|
|
export const suggestionItems = createSuggestionItems([
|
|
{
|
|
title: 'Text',
|
|
description: 'Just start typing with plain text.',
|
|
searchTerms: ['p', 'paragraph'],
|
|
icon: <Text size={18} />,
|
|
command: ({ editor, range }) => {
|
|
editor
|
|
.chain()
|
|
.focus()
|
|
.deleteRange(range)
|
|
.toggleNode('paragraph', 'paragraph')
|
|
.run()
|
|
}
|
|
},
|
|
|
|
{
|
|
title: 'Heading 1',
|
|
description: 'Big section heading.',
|
|
searchTerms: ['title', 'big', 'large'],
|
|
icon: <Heading1 size={18} />,
|
|
command: ({ editor, range }) => {
|
|
editor
|
|
.chain()
|
|
.focus()
|
|
.deleteRange(range)
|
|
.setNode('heading', { level: 1 })
|
|
.run()
|
|
}
|
|
},
|
|
{
|
|
title: 'Heading 2',
|
|
description: 'Medium section heading.',
|
|
searchTerms: ['subtitle', 'medium'],
|
|
icon: <Heading2 size={18} />,
|
|
command: ({ editor, range }) => {
|
|
editor
|
|
.chain()
|
|
.focus()
|
|
.deleteRange(range)
|
|
.setNode('heading', { level: 2 })
|
|
.run()
|
|
}
|
|
},
|
|
{
|
|
title: 'Heading 3',
|
|
description: 'Small section heading.',
|
|
searchTerms: ['subtitle', 'small'],
|
|
icon: <Heading3 size={18} />,
|
|
command: ({ editor, range }) => {
|
|
editor
|
|
.chain()
|
|
.focus()
|
|
.deleteRange(range)
|
|
.setNode('heading', { level: 3 })
|
|
.run()
|
|
}
|
|
},
|
|
{
|
|
title: 'Bullet List',
|
|
description: 'Create a simple bullet list.',
|
|
searchTerms: ['unordered', 'point'],
|
|
icon: <List size={18} />,
|
|
command: ({ editor, range }) => {
|
|
editor.chain().focus().deleteRange(range).toggleBulletList().run()
|
|
}
|
|
},
|
|
{
|
|
title: 'Numbered List',
|
|
description: 'Create a list with numbering.',
|
|
searchTerms: ['ordered'],
|
|
icon: <ListOrdered size={18} />,
|
|
command: ({ editor, range }) => {
|
|
editor.chain().focus().deleteRange(range).toggleOrderedList().run()
|
|
}
|
|
}
|
|
])
|
|
|