mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-08 09:59:53 +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,18 +0,0 @@
|
|||
from python.helpers.api import ApiHandler, Request, Response
|
||||
|
||||
|
||||
class Pause(ApiHandler):
|
||||
async def process(self, input: dict, request: Request) -> dict | Response:
|
||||
# input data
|
||||
paused = input.get("paused", False)
|
||||
ctxid = input.get("context", "")
|
||||
|
||||
# context instance - get or create
|
||||
context = self.use_context(ctxid)
|
||||
|
||||
context.paused = paused
|
||||
|
||||
return {
|
||||
"message": "Agent paused." if paused else "Agent unpaused.",
|
||||
"pause": paused,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue