mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-06-22 19:14:49 +02:00
Introduce _bot_globals for persistent data storage between bot executions
This commit is contained in:
@@ -39,6 +39,8 @@ BOT_MESSAGE_SPACING = 2.0
|
||||
_bot_send_lock = asyncio.Lock()
|
||||
_last_bot_send_time: float = 0.0
|
||||
|
||||
# global container for persistent data storage between bot executions, will be added to execution namespace
|
||||
_bot_globals: dict[str,Any] = {}
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BotCallPlan:
|
||||
@@ -185,6 +187,7 @@ def execute_bot_code(
|
||||
# Build execution namespace with allowed imports
|
||||
namespace: dict[str, Any] = {
|
||||
"__builtins__": __builtins__,
|
||||
"_bot_globals": _bot_globals,
|
||||
}
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user