mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 12:10:57 +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
15
extensions/python/tool_execute_after/_10_mask_secrets.py
Normal file
15
extensions/python/tool_execute_after/_10_mask_secrets.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from helpers.extension import Extension
|
||||
from helpers.secrets import get_secrets_manager
|
||||
from helpers.tool import Response
|
||||
|
||||
|
||||
class MaskToolSecrets(Extension):
|
||||
|
||||
async def execute(self, response: Response | None = None, **kwargs):
|
||||
if not self.agent:
|
||||
return
|
||||
|
||||
if not response:
|
||||
return
|
||||
secrets_mgr = get_secrets_manager(self.agent.context)
|
||||
response.message = secrets_mgr.mask_values(response.message)
|
||||
Loading…
Add table
Add a link
Reference in a new issue