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(history): filter deleted items from command and mentions menus (#404)

Seamus1315188cb0c1
diff --git a/js/app/packages/app/component/command/useCommandItems.ts b/js/app/packages/app/component/command/useCommandItems.ts
index 50b427cfae..1e3d986a2a 100644
--- a/js/app/packages/app/component/command/useCommandItems.ts
+++ b/js/app/packages/app/component/command/useCommandItems.ts
@@ -64,6 +64,9 @@ export function useCommandItems() {
if (FILTER_PERSISTENT_CHATS && item.type === 'chat') {
return !item.isPersistent;
}
+ if (item.deletedAt) {
+ return false;
+ }
return true;
})
.map((item) => ({
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu.tsx
index ae9d238cc3..a1d15f6d4e 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu.tsx
@@ -207,6 +207,9 @@ function allItemFilter(item: CombinedEntity): boolean {
) {
return false;
}
+ if (item.kind === 'item' && item.data.deletedAt) {
+ return false;
+ }
return true;
}