Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/app/services/agent_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ async def build_agent_context(agent_id: uuid.UUID, agent_name: str, role_descrip
try:
from app.models.channel_config import ChannelConfig
from app.database import async_session as _ctx_session
from sqlalchemy import select as _feishu_select
async with _ctx_session() as _ctx_db:
_cfg_r = await _ctx_db.execute(
select(ChannelConfig).where(
_feishu_select(ChannelConfig).where(
ChannelConfig.agent_id == agent_id,
ChannelConfig.channel_type == "feishu",
ChannelConfig.is_configured == True,
Expand Down Expand Up @@ -334,6 +335,7 @@ async def build_agent_context(agent_id: uuid.UUID, agent_name: str, role_descrip
try:
from app.database import async_session
from app.models.system_settings import SystemSetting
from app.models.agent import Agent as _AgentModel
from sqlalchemy import select as sa_select
async with async_session() as db:
# Resolve agent's tenant_id
Expand Down