from __future__ import annotations from typing import Any import httpx from yuxi.utils.logging_config import logger from .mp.client import MPClient from .wecom.client import WeComClient async def resolve_timeline_wecom( client: WeComClient, http_client: httpx.AsyncClient, chat_id: str, limit: int = 50 ) -> list[dict[str, Any]]: messages: list[dict[str, Any]] = [] try: await client.get_access_token() return messages except Exception as e: logger.warning(f"[WeChat/Timeline] resolve_timeline_wecom failed: {e}") return messages async def resolve_timeline_mp( client: MPClient, http_client: httpx.AsyncClient, open_id: str, limit: int = 50 ) -> list[dict[str, Any]]: messages: list[dict[str, Any]] = [] try: await client.get_access_token() return messages except Exception as e: logger.warning(f"[WeChat/Timeline] resolve_timeline_mp failed: {e}") return messages async def resolve_timeline_bridge(bridge_client, chat_id: str, limit: int = 50) -> list[dict[str, Any]]: try: return [] except Exception as e: logger.warning(f"[WeChat/Timeline] resolve_timeline_bridge failed: {e}") return []