main
py 18 lines 562 Bytes
Raw
1 from helpers.api import ApiHandler
2 from flask import Request, Response
3 from agent import AgentContext
4
5
6 class NotificationsClear(ApiHandler):
7 @classmethod
8 def requires_auth(cls) -> bool:
9 return True
10
11 async def process(self, input: dict, request: Request) -> dict | Response:
12 # Get the global notification manager
13 notification_manager = AgentContext.get_notification_manager()
14
15 # Clear all notifications
16 notification_manager.clear_all()
17
18 return {"success": True, "message": "All notifications cleared"}