import os
from typing import Union, Optional
from pathlib import Path

def get_image_path(file_path: str) -> str:
    """获取图片的绝对路径"""
    return os.path.abspath(file_path)

def format_user_mention(user_id: str, user_name: Optional[str] = None) -> str:
    """格式化用户@信息"""
    display_name = user_name if user_name else f"用户{user_id}"
    return f"@{display_name}" 