Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
fix(upload): accept XMind files before parser engine discovery
wizardchen58260d192c40
diff --git a/frontend/src/components/AttachmentUpload.vue b/frontend/src/components/AttachmentUpload.vueindex ce3cc0ea7..b575a7715 100644--- a/frontend/src/components/AttachmentUpload.vue+++ b/frontend/src/components/AttachmentUpload.vue@@ -48,7 +48,7 @@ let disposed = false;// Supported file types (matching backend)const supportedTypes = ref([// Documents- '.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.epub', '.mhtml',+ '.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.epub', '.mhtml', '.xmind',// Text'.txt', '.md', '.csv', '.json', '.xml', '.html','.markdown', '.yaml', '.yml', '.log',diff --git a/frontend/src/utils/fileTypeVerification.test.ts b/frontend/src/utils/fileTypeVerification.test.tsindex 338f9ef60..8b1cc3768 100644--- a/frontend/src/utils/fileTypeVerification.test.ts+++ b/frontend/src/utils/fileTypeVerification.test.ts@@ -14,3 +14,13 @@ test('shouldRejectKnowledgeFileType preserves dynamic whitelist behavior', () =>assert.equal(shouldRejectKnowledgeFileType('page.html', ['pdf']), true)assert.equal(shouldRejectKnowledgeFileType('page.html', []), false)})++test('XMind uploads work before engine discovery and respect discovered capabilities', () => {+ for (const filename of ['architecture.xmind', 'ARCHITECTURE.XMIND']) {+ assert.equal(shouldRejectKnowledgeFileType(filename), false)+ assert.equal(shouldRejectKnowledgeFileType(filename, []), false)+ assert.equal(shouldRejectKnowledgeFileType(filename, new Set()), false)+ assert.equal(shouldRejectKnowledgeFileType(filename, ['pdf', 'xmind']), false)+ assert.equal(shouldRejectKnowledgeFileType(filename, ['pdf']), true)+ }+})diff --git a/frontend/src/utils/fileTypeVerification.ts b/frontend/src/utils/fileTypeVerification.tsindex 24d46ddde..586678e22 100644--- a/frontend/src/utils/fileTypeVerification.ts+++ b/frontend/src/utils/fileTypeVerification.ts@@ -7,6 +7,7 @@ const DEFAULT_VALID_TYPES = new Set(["pptx","ppt","epub",+ "xmind","html","htm","mhtml",diff --git a/internal/application/service/temporary_document.go b/internal/application/service/temporary_document.goindex 2c478d3f6..af6def7ec 100644--- a/internal/application/service/temporary_document.go+++ b/internal/application/service/temporary_document.go@@ -83,7 +83,8 @@ var markdownImagePattern = regexp.MustCompile(`!\[[^\]]*\]\([^)]*\)`)var temporaryDocumentExtensions = map[string]struct{}{".docx": {}, ".doc": {}, ".pdf": {}, ".ppt": {}, ".pptx": {}, ".epub": {}, ".mhtml": {},- ".xlsx": {}, ".xls": {},+ ".xmind": {},+ ".xlsx": {}, ".xls": {},".md": {}, ".markdown": {}, ".txt": {}, ".csv": {}, ".json": {}, ".xml": {}, ".yaml": {}, ".yml": {}, ".log": {}, ".html": {},".jpg": {}, ".jpeg": {}, ".png": {}, ".gif": {}, ".bmp": {}, ".tiff": {}, ".webp": {},".mp3": {}, ".wav": {}, ".m4a": {}, ".flac": {}, ".ogg": {}, ".aac": {},diff --git a/internal/application/service/temporary_document_test.go b/internal/application/service/temporary_document_test.goindex 09b663d7b..aa6d2729d 100644--- a/internal/application/service/temporary_document_test.go+++ b/internal/application/service/temporary_document_test.go@@ -80,6 +80,16 @@ func TestApproxTextContentRunes(t *testing.T) {}}+func TestTemporaryDocumentSupportsXMindWithoutEngineDiscovery(t *testing.T) {+ svc := &temporaryDocumentService{}+ if !svc.supportsExtension(context.Background(), 1, ".xmind") {+ t.Fatal("XMind must be accepted even when engine discovery is unavailable")+ }+ if svc.supportsExtension(context.Background(), 1, ".exe") {+ t.Fatal("unsupported attachments must still be rejected")+ }+}+func TestCollectImageBytes(t *testing.T) {refs := []types.ImageRef{{ImageData: []byte("a")},