feat: add EPUB and MHTML document support

This commit is contained in:
FFFFFFpy
2026-06-16 10:34:58 +09:00
committed by lyingbug
parent fe7aded648
commit e21a5da422
20 changed files with 770 additions and 18 deletions
@@ -436,6 +436,8 @@ const fileTypeOptions = computed(() => [
{ label: 'DOC', value: 'doc' },
{ label: 'PPTX', value: 'pptx' },
{ label: 'PPT', value: 'ppt' },
{ label: 'EPUB', value: 'epub' },
{ label: 'MHTML', value: 'mhtml' },
{ label: 'TXT', value: 'txt' },
{ label: 'MD', value: 'md' },
{ label: 'URL', value: 'url' },
@@ -162,6 +162,8 @@ const fileTypeGroups = computed(() => {
const officeExts = ['docx', 'doc'].filter(e => ft.has(e))
const pptExts = ['pptx', 'ppt'].filter(e => ft.has(e))
const excelExts = ['xlsx', 'xls'].filter(e => ft.has(e))
const ebookExts = ['epub'].filter(e => ft.has(e))
const webArchiveExts = ['mhtml'].filter(e => ft.has(e))
const csvExts = ['csv'].filter(e => ft.has(e))
const mdExts = ['md', 'markdown'].filter(e => ft.has(e))
const txtExts = ['txt'].filter(e => ft.has(e))
@@ -174,6 +176,8 @@ const fileTypeGroups = computed(() => {
if (officeExts.length) groups.push({ key: 'office', label: t('kbSettings.parser.fileTypeWord'), icon: 'file-word', extensions: officeExts })
if (pptExts.length) groups.push({ key: 'ppt', label: t('kbSettings.parser.fileTypePpt'), icon: 'file-powerpoint', extensions: pptExts })
if (excelExts.length) groups.push({ key: 'excel', label: t('kbSettings.parser.fileTypeExcel'), icon: 'file-excel', extensions: excelExts })
if (ebookExts.length) groups.push({ key: 'ebook', label: t('kbSettings.parser.fileTypeEbook'), icon: 'file', extensions: ebookExts })
if (webArchiveExts.length) groups.push({ key: 'webarchive', label: t('kbSettings.parser.fileTypeWebArchive'), icon: 'file', extensions: webArchiveExts })
if (csvExts.length) groups.push({ key: 'csv', label: t('kbSettings.parser.fileTypeCsv'), icon: 'file-excel', extensions: csvExts })
if (mdExts.length) groups.push({ key: 'markdown', label: 'Markdown', icon: 'file-code', extensions: mdExts })
if (txtExts.length) groups.push({ key: 'text', label: t('kbSettings.parser.fileTypeText'), icon: 'file', extensions: txtExts })