mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-12 14:09:52 +00:00
BIG PYTHON REFACTOR
Python scripts moved out of python/ folder to root to be unified with plugins + frontend extension around api calls
This commit is contained in:
parent
f94b7d742c
commit
d02dda3667
326 changed files with 1096 additions and 862 deletions
|
|
@ -1,19 +0,0 @@
|
|||
from python.helpers.api import ApiHandler, Request, Response
|
||||
from python.helpers.extension import call_extensions
|
||||
|
||||
|
||||
class GetBanners(ApiHandler):
|
||||
"""
|
||||
API endpoint for Welcome Screen banners.
|
||||
Add checks as extension scripts in python/extensions/banners/ or usr/extensions/banners/
|
||||
"""
|
||||
|
||||
async def process(self, input: dict, request: Request) -> dict | Response:
|
||||
banners = input.get("banners", [])
|
||||
frontend_context = input.get("context", {})
|
||||
|
||||
# Banners array passed by reference - extensions append directly to it
|
||||
await call_extensions("banners", agent=None, banners=banners, frontend_context=frontend_context)
|
||||
|
||||
return {"banners": banners}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue