fix(imports): 3 broken imports — ENTITY_MODELS path, Room→CommConversation, get_cached_mail_summary→MailService
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -55,7 +55,7 @@ async def send_agent_message(
|
||||
|
||||
# 2. Create a kommunikation message in a dedicated agent room
|
||||
try:
|
||||
from app.plugins.builtins.kommunikation.contracts import Message, Room
|
||||
from app.plugins.builtins.kommunikation.contracts import CommConversation as Room, CommMessage as Message
|
||||
|
||||
# Find or create the agent-to-agent room
|
||||
room_name = f"agent:{from_agent_id}:{target_agent.id}"
|
||||
|
||||
@@ -112,8 +112,15 @@ async def run_agent(
|
||||
logger.warning("Failed to collect contacts for proactive context")
|
||||
|
||||
try:
|
||||
from app.core.cache import get_cached_mail_summary
|
||||
context_data["recent_mails"] = get_cached_mail_summary(agent.tenant_id) or []
|
||||
from app.services.mail_service import MailService
|
||||
mail_svc = MailService(db)
|
||||
recent_mails = await mail_svc.list_mails(
|
||||
tenant_id=agent.tenant_id,
|
||||
user_id=None,
|
||||
page=1,
|
||||
page_size=5,
|
||||
)
|
||||
context_data["recent_mails"] = recent_mails.get("items", [])
|
||||
except Exception:
|
||||
logger.warning("Failed to collect mails for proactive context")
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ async def _check_entity_ownership(
|
||||
|
||||
from sqlalchemy import select
|
||||
|
||||
from app.models.entity_permission import ENTITY_MODELS
|
||||
from app.services.entity_permission_service import ENTITY_MODELS
|
||||
|
||||
model_info = ENTITY_MODELS.get(entity_type)
|
||||
if model_info is None:
|
||||
|
||||
Reference in New Issue
Block a user