| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- # -*- 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": "获取当前系统时间",
- "read_file_content": "读取文件内容",
- "search_chat_history": "搜索聊天记录",
- "get_session_chat": "获取会话消息",
- "get_current_session_id": "获取当前会话ID",
- "save_report": "保存报告文件",
- # ================================================================
- # 用户偏好记忆
- # ================================================================
- "save_user_preference": "保存用户偏好",
- "list_user_preferences": "查看用户偏好",
- "delete_user_preference": "删除用户偏好",
- # ================================================================
- # 计划审批(Human-in-the-Loop)
- # ================================================================
- "request_plan_approval": "提交执行计划审批",
- # ================================================================
- # 需风量 / 模型数据(新增)
- # ================================================================
- "get_model_param_pub_list": "查询模型参数列表",
- "get_model_wind": "查询巷道解算风量",
- "get_sensor_wind": "查询设备监测风量",
- "simulate_needq_heading_face": "掘进面需风量模拟",
- "simulate_needq_room": "硐室需风量模拟",
- "simulate_needq_ret_work_face": "采煤面需风量模拟",
- "simulate_needq_other": "其他地点需风量模拟",
- # ================================================================
- # 设备信息(新增)
- # ================================================================
- "query_device_info": "查询设备详细信息",
- "query_device_type_info": "查询设备类型信息",
- "query_monitor_params": "查询监测点参数",
- "query_devices_by_model": "按模型查询设备",
- # ================================================================
- # 故障诊断(新增)
- # ================================================================
- "check_model_connect_status": "模型连通性检查",
- "check_model_one_dir_cycle": "循环风路检查",
- "check_model_one_dir_node": "单向节点检查",
- "check_model_diagonal_structure": "角联结构诊断",
- "get_model_fault_diagnosis": "模型故障诊断",
- # ================================================================
- # 避灾路线(新增)
- # ================================================================
- "get_escape_path": "避灾路线模拟",
- "get_escape_path_each_exit": "避灾路线模拟(各出口)",
- # ================================================================
- # 关键阻力 / 压能(新增)
- # ================================================================
- "get_out_shafts": "查询回风井列表",
- "get_in_shafts": "查询进风井列表",
- "get_max_resistance_path": "最大阻力路线",
- "get_three_area_distribution": "三区阻力分布",
- "get_key_path_decision": "关键路径决策",
- "get_path_press_power": "节点压能图",
- # ================================================================
- # 网络解算(新增)
- # ================================================================
- "net_cal": "网络解算",
- "net_cal_for_plan": "方案模拟解算",
- # ================================================================
- # 报警 / 日志(新增)
- # ================================================================
- "get_alarm_log_history": "查询报警历史",
- "get_device_set_log_history": "查询设备控制历史",
- "get_sys_log_history": "查询登录历史",
- # ================================================================
- # 场景管理(新增)
- # ================================================================
- "get_manage_system_by_strType": "按类型查场景列表",
- "query_system_by_systemID": "按ID查场景数据",
- # ================================================================
- # 煤矿基础(新增)
- # ================================================================
- "get_gas_identify_vo": "查询瓦斯等级鉴定报告",
- "get_by_mine_name": "查询工作面设计规程",
- "query_control_testWind": "一键测风",
- # ================================================================
- # 数据库 / 文件(新增)
- # ================================================================
- "execute_sql_query": "执行SQL查询",
- "get_file_list_by_type": "按类型查文件列表",
- "get_file_base64_by_id": "按ID查文件Base64",
- # ================================================================
- # 字典查询(新增)
- # ================================================================
- "get_dict_list_by_dictcode": "查询字典项",
- # ================================================================
- # 测风报表(新增)
- # ================================================================
- "get_latest_report": "查询最新测风报表",
- }
|