Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat[soup]: add docx to document filters (#2167)

Peter Chinmancb978b68be7b
diff --git a/js/app/packages/app/component/next-soup/filters/configs.ts b/js/app/packages/app/component/next-soup/filters/configs.ts
index e9973784d6..e20bde3ad4 100644
--- a/js/app/packages/app/component/next-soup/filters/configs.ts
+++ b/js/app/packages/app/component/next-soup/filters/configs.ts
@@ -247,19 +247,28 @@ export const FILE_TYPE_FILTERS = [
return entity.fileType === 'pdf';
},
},
+ {
+ id: 'file-docx',
+ label: 'DOCX',
+ predicate: (entity) => {
+ if (entity.type !== 'document') return false;
+ return entity.fileType === 'docx';
+ },
+ },
{
id: 'file-other',
label: 'Other',
predicate: (entity) => {
if (entity.type !== 'document') return false;
const fileType = entity.fileType ?? '';
- // Exclude markdown, canvas, code, images, and PDFs
+ // Exclude markdown, canvas, code, images, PDFs, and DOCX
if (['md', 'canvas'].includes(fileType)) return false;
if ((codeFileExtensions as readonly string[]).includes(fileType))
return false;
if ((IMAGE_EXTENSIONS as readonly string[]).includes(fileType))
return false;
if (fileType === 'pdf') return false;
+ if (fileType === 'docx') return false;
return true;
},
},
diff --git a/js/app/packages/app/component/next-soup/filters/query-filters.ts b/js/app/packages/app/component/next-soup/filters/query-filters.ts
index 64e6c355d9..9471536dbd 100644
--- a/js/app/packages/app/component/next-soup/filters/query-filters.ts
+++ b/js/app/packages/app/component/next-soup/filters/query-filters.ts
@@ -155,7 +155,7 @@ export const QUERY_FILTERS = {
chat_filters: { chat_ids: EXCLUDE },
email_filters: { recipients: EXCLUDE },
document_filters: {
- file_types: ['md', 'canvas', ...getFileAssociations('soup')],
+ file_types: ['md', 'canvas', 'docx', ...getFileAssociations('soup')],
},
},
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
index d65cf69a32..874f2b30cc 100644
--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
@@ -269,6 +269,11 @@ const DOCUMENTS_FILTER_CATEGORIES: FilterCategory[] = [
label: 'PDFs',
icon: () => <EntityIcon targetType="pdf" size="xs" />,
},
+ {
+ id: 'file-docx',
+ label: 'DOCX',
+ icon: () => <EntityIcon targetType="write" size="xs" />,
+ },
{
id: 'file-other',
label: 'Other',