mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-20 15:37:27 +08:00
style(api): format the streamed Agent debug helper with ruff
This commit is contained in:
@@ -29,11 +29,7 @@ def debug_stream_response(service, context, agent_uuid: str, payload: dict) -> q
|
||||
application = getattr(service, 'ap', None)
|
||||
persistence_mgr = getattr(application, 'persistence_mgr', None)
|
||||
tenant_scope = getattr(persistence_mgr, 'tenant_scope', None)
|
||||
scope = (
|
||||
tenant_scope(context.workspace_uuid)
|
||||
if callable(tenant_scope)
|
||||
else contextlib.nullcontext()
|
||||
)
|
||||
scope = tenant_scope(context.workspace_uuid) if callable(tenant_scope) else contextlib.nullcontext()
|
||||
try:
|
||||
# The streamed body is emitted after the request handler returned,
|
||||
# so the request's tenant scope has already closed: carry the
|
||||
|
||||
Reference in New Issue
Block a user