mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 19:51:11 +00:00
Change default self-update backup directory from /a0/tmp to /root and add lazy aiogram dependency loading for Telegram plugin
- Update default backup path from /a0/tmp/self-update-backups to /root/update-backups in self_update_manager.py, helpers/self_update.py, and documentation - Move aiogram from global requirements.txt to plugin-local requirements for _telegram_integration - Add ensure_dependencies() helper that installs aiogram on-demand via uv pip install - Add has_aiogram() check to avoid
This commit is contained in:
parent
68ad5aca46
commit
247c8d845f
15 changed files with 135 additions and 35 deletions
|
|
@ -1,10 +1,11 @@
|
|||
from helpers.extension import Extension
|
||||
from helpers.tool import Response
|
||||
from plugins._telegram_integration.helpers.handler import (
|
||||
from plugins._telegram_integration.helpers.constants import (
|
||||
CTX_TG_BOT,
|
||||
CTX_TG_ATTACHMENTS,
|
||||
CTX_TG_KEYBOARD,
|
||||
)
|
||||
from plugins._telegram_integration.helpers.dependencies import ensure_dependencies
|
||||
|
||||
|
||||
class TelegramResponseIntercept(Extension):
|
||||
|
|
@ -40,6 +41,7 @@ class TelegramResponseIntercept(Extension):
|
|||
await self._send_inline(context, tool, response)
|
||||
|
||||
async def _send_inline(self, context, tool, response: Response):
|
||||
ensure_dependencies()
|
||||
from plugins._telegram_integration.helpers.handler import send_telegram_reply
|
||||
|
||||
agent = self.agent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue