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(ai): clear notifications (#1718)

Eric Hayes42aa2c702064
diff --git a/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts b/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts
index 30aff59cc7..6bb62cd799 100644
--- a/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts
+++ b/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts
@@ -37,7 +37,11 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {
useSetPropertyStatusCompleteMutation();
const canExecute = (entity: EntityData): boolean => {
- if (entity.type === 'email' || entity.type === 'channel') {
+ if (
+ entity.type === 'email' ||
+ entity.type === 'channel' ||
+ entity.type === 'chat'
+ ) {
return true;
}
diff --git a/js/app/packages/block-chat/component/Block.tsx b/js/app/packages/block-chat/component/Block.tsx
index 17c8d47e19..bc9e4f7d60 100644
--- a/js/app/packages/block-chat/component/Block.tsx
+++ b/js/app/packages/block-chat/component/Block.tsx
@@ -1,5 +1,8 @@
+import { useGlobalNotificationSource } from '@app/component/GlobalAppState';
import { DEFAULT_CHAT_NAME } from '@block-chat/definition';
+import { useBlockId } from '@core/block';
import { DocumentBlockContainer } from '@core/component/DocumentBlockContainer';
+import { DebouncedNotificationReadMarker } from '@notifications';
import { createEffect, createSignal, Show } from 'solid-js';
import { chatBlockData } from '../signal/chatBlockData';
import { Chat } from './Chat';
@@ -7,6 +10,8 @@ import { ModalsProvider } from './ModalsProvider';
export default function ChatBlock() {
const [title, setTitle] = createSignal<string>(DEFAULT_CHAT_NAME);
+ const blockId = useBlockId();
+ const notificationSource = useGlobalNotificationSource();
createEffect(() => {
const data = chatBlockData();
@@ -17,6 +22,10 @@ export default function ChatBlock() {
return (
<DocumentBlockContainer title={title()}>
+ <DebouncedNotificationReadMarker
+ notificationSource={notificationSource}
+ entity={{ type: 'chat', id: blockId }}
+ />
<div class="size-full bracket-never" tabIndex={-1}>
<ModalsProvider>
<Show when={chatBlockData()}>{(data) => <Chat data={data()} />}</Show>