from ahserver.serverenv import get_user async def get_current_user_id() -> str: """Get the current user ID from ahserver context.""" try: # Use ahserver's built-in get_user() function user_id = await get_user() return user_id except Exception as e: print(f"Warning: Could not get current user ID: {e}") # Fallback to a safe default return "default_user"