diff --git a/backend/app/api/skills.py b/backend/app/api/skills.py index d77d6efb8..4845e8487 100644 --- a/backend/app/api/skills.py +++ b/backend/app/api/skills.py @@ -55,9 +55,6 @@ ) from app.security.tenant import ensure_tenant from app.skills import SkillDistiller, SkillEditor - -_CHANNEL_LABELS = {"wechat": "微信", "wecom": "企业微信", "feishu": "飞书", "dingtalk": "钉钉"} - from app.skills.skill_schema import ( SkillCard, SkillCreateRequest, @@ -81,6 +78,8 @@ validate_sop_nesting, ) +_CHANNEL_LABELS = {"wechat": "微信", "wecom": "企业微信", "feishu": "飞书", "dingtalk": "钉钉"} + router = APIRouter( prefix="/api/enterprise/skills", tags=["enterprise:skills"], diff --git a/backend/app/core/agent_loop.py b/backend/app/core/agent_loop.py index 6c230aebf..3c6b915ef 100644 --- a/backend/app/core/agent_loop.py +++ b/backend/app/core/agent_loop.py @@ -58,8 +58,6 @@ resolve_model_config_for_runtime, ) from app.llm.stage_protocol import stage_payload, unified_system_prompt - -logger = logging.getLogger(__name__) from app.memory.jobs import enqueue_memory_capture from app.memory.service import MemoryService from app.observability import EventLog @@ -75,6 +73,8 @@ ) from app.tools.tool_schema import ToolResult +logger = logging.getLogger(__name__) + STREAM_CHUNK_INTERVAL_SECONDS = 0.045 MAX_TOOL_ACTIONS_PER_TURN = 32 MAX_TOOL_ACTIONS_PER_TURN_LIMIT = 100 diff --git a/backend/tests/test_channel_routing.py b/backend/tests/test_channel_routing.py index f5e05d669..439f54199 100644 --- a/backend/tests/test_channel_routing.py +++ b/backend/tests/test_channel_routing.py @@ -622,7 +622,7 @@ def test_delete_agent_cleans_channel_mounts_and_repoints_default() -> None: client = _make_agents_client(engine) deleted = client.delete( - f"/api/enterprise/agents/agent_cw?tenant_id=tenant_demo", + "/api/enterprise/agents/agent_cw?tenant_id=tenant_demo", headers=_auth(users["owner"]), ) assert deleted.status_code == 200 @@ -671,7 +671,7 @@ def test_delete_agent_last_mount_keeps_binding_agent() -> None: client = _make_agents_client(engine) deleted = client.delete( - f"/api/enterprise/agents/agent_cw?tenant_id=tenant_demo", + "/api/enterprise/agents/agent_cw?tenant_id=tenant_demo", headers=_auth(users["owner"]), ) assert deleted.status_code == 200