mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-20 17:30:59 +00:00
feat(box): add global sandbox scope option
Add a 'Global (shared by all)' option to the sandbox scope selector.
Uses a constant '{global}' template variable that always resolves to
'global', so all users and chats share one sandbox container.
This commit is contained in:
@@ -176,7 +176,8 @@ class BoxService:
|
|||||||
.get('local-agent', {})
|
.get('local-agent', {})
|
||||||
.get('box-session-id-template', '{launcher_type}_{launcher_id}')
|
.get('box-session-id-template', '{launcher_type}_{launcher_id}')
|
||||||
)
|
)
|
||||||
variables = query.variables or {}
|
variables = dict(query.variables or {})
|
||||||
|
variables.setdefault('global', 'global')
|
||||||
return template.format_map(collections.defaultdict(lambda: 'unknown', variables))
|
return template.format_map(collections.defaultdict(lambda: 'unknown', variables))
|
||||||
|
|
||||||
def build_skill_extra_mounts(self, query: pipeline_query.Query) -> list[dict]:
|
def build_skill_extra_mounts(self, query: pipeline_query.Query) -> list[dict]:
|
||||||
|
|||||||
Reference in New Issue
Block a user