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.

fix: title extract (#1585)

gbirman1c324da9a228
diff --git a/js/app/packages/entity/src/extractors/entity-title.tsx b/js/app/packages/entity/src/extractors/entity-title.tsx
index e64ef7b1b8..36da546634 100644
--- a/js/app/packages/entity/src/extractors/entity-title.tsx
+++ b/js/app/packages/entity/src/extractors/entity-title.tsx
@@ -8,13 +8,11 @@ import { isSearchEntity } from '../types/search';
function extractRawTitle(entity: EntityData): string {
return match(entity)
- .with({ type: 'document', subType: { type: 'task' } }, (e) =>
- formatDocumentName(e.name)
+ .with({ type: 'document' }, (e) =>
+ formatDocumentName(e.name, e.fileType, {
+ fullyQualifiedBlockName: true,
+ })
)
- .with({ type: 'document', fileType: 'md' }, (e) =>
- formatDocumentName(e.name)
- )
- .with({ type: 'document' }, (e) => formatDocumentName(e.name, e.fileType))
.with({ type: 'project' }, (e) => e.name)
.with({ type: 'channel' }, (e) => e.name)
.with({ type: 'email' }, (e) => e.name || '(No Subject)')
diff --git a/js/app/packages/service-clients/service-storage/util/filename.ts b/js/app/packages/service-clients/service-storage/util/filename.ts
index c43fd592d2..7b69e83b22 100644
--- a/js/app/packages/service-clients/service-storage/util/filename.ts
+++ b/js/app/packages/service-clients/service-storage/util/filename.ts
@@ -1,6 +1,11 @@
+import type { BlockName, BlockAlias } from '@core/block';
import { fileTypeToBlockName } from '@core/constant/allBlocks';
-const FULLY_QUALIFIED_DOCUMENT_NAME_BLOCKS = ['unknown', 'code'];
+const FULLY_QUALIFIED_DOCUMENT_NAME_BLOCKS: Array<BlockName | BlockAlias> = [
+ 'unknown',
+ 'code',
+ 'image',
+];
/**
* Gets the filename without the extension.