# -*- coding: utf-8 -*-
"""
工具函数名 → 中文显示名 统一映射表

所有 SSE 事件中的中文工具名均从此处获取，修改一处即可全局生效。
新增工具后在此表追加条目即可，无需改动路由层或 Agent 层。

使用方式：
    from tools.tool_names_cn import TOOL_NAME_CN
    cn_name = TOOL_NAME_CN.get(tool_name, tool_name)
"""

TOOL_NAME_CN: dict[str, str] = {
    # ================================================================
    # DeepAgents 内置工具（文件系统 / 搜索 / 命令执行）
    # ================================================================
    "write_todos": "更新任务计划",
    "task": "委派子任务",
    "read_file": "读取文件",
    "read": "读取文件",
    "write_file": "写入文件",
    "write": "写入文件",
    "edit_file": "编辑文件",
    "edit": "编辑文件",
    "ls": "列出目录",
    "glob": "搜索文件",
    "grep": "搜索文本",
    "execute": "执行命令",
    "bash": "执行命令",
    "web_search": "网络搜索",
    "web_fetch": "获取网页",
    "TodoWrite": "更新任务计划",
    "Bash": "执行命令",
    "Read": "读取文件",
    "Write": "写入文件",
    "Edit": "编辑文件",
    "Glob": "搜索文件",
    "Grep": "搜索文本",

    # ================================================================
    # MCP 远程数据查询（vent_tools.py / vent_plan_tools.py）
    # ================================================================
    "query_device_data": "查询设备实时数据",
    "query_device_data_by_id": "查询设备监测数据",
    "query_devices_by_tunnel": "查询巷道关联设备",
    "query_devices_by_tunnel_id": "查询巷道设备列表",
    "get_tun_list_by_modelid": "获取模型巷道列表",
    "query_tunnels_by_model": "查询模型巷道列表",
    "query_tunnel_list": "按名称搜索巷道",
    "query_tun_data_by_id": "查询巷道监测数据",
    "query_knowledge_base": "检索煤矿安全知识库",
    "get_needq_all_data": "获取管控平台需风量数据",
    "list_ventanaly_monitor_data_days": "查询监测历史时序数据",
    "get_device_kind_dict": "查询设备类型字典",
    "get_device_list_by_kind": "按类型查询设备列表",
    "query_device_realtime_data": "查询设备实时数据",

    # MCP 配风计划审查（vent_plan_tools.py）
    "query_mining_plan": "查询采掘计划",
    "query_face_procedure": "查询作业规程",
    "query_gas_report": "查询瓦斯鉴定报告",
    "query_wind_report": "查询测风报表",

    # ================================================================
    # 本地需风量计算工具（calc_tools.py）
    # ================================================================
    # 采煤工作面
    "calc_face_by_gas": "采煤面瓦斯需风量计算",
    "calc_face_by_workers": "采煤面人数需风量计算",
    "calc_face_by_wind_speed": "采煤面风速需风量计算",
    "calc_face_air_volume_max": "采煤面综合需风量计算",
    # 掘进工作面
    "calc_tunnel_by_gas": "掘进面瓦斯需风量计算",
    "calc_tunnel_by_explosives": "掘进面炸药需风量计算",
    "calc_tunnel_by_workers": "掘进面人数需风量计算",
    "calc_tunnel_by_wind_speed": "掘进面风速需风量计算",
    "calc_tunnel_by_vehicle": "掘进面胶轮车需风量计算",
    "calc_tunnel_air_volume_max": "掘进面综合需风量计算",
    # 硐室
    "calc_chamber_by_equipment": "硐室设备需风量计算",
    "calc_chamber_by_wind_speed": "硐室风速需风量计算",
    # 其他巷道
    "calc_other_by_wind_speed": "其他巷道风速需风量计算",
    # 辅助计算
    "calc_effective_area": "有效断面积计算",
    "calc_total_air_volume": "总需风量汇总计算",

    # ================================================================
    # 反算 / 系统工具
    # ================================================================
    "calc_gas_emission_from_wind": "测风报表涌出量反算",
    "get_current_time": "获取当前系统时间",

    # ================================================================
    # 用户偏好记忆
    # ================================================================
    "save_user_preference": "保存用户偏好",
    "list_user_preferences": "查看用户偏好",
    "delete_user_preference": "删除用户偏好",

    # ================================================================
    # 计划审批（Human-in-the-Loop）
    # ================================================================
    "request_plan_approval": "提交执行计划审批",
}
